Plotting Simple Harmonic Oscillations

Remove["Global`*"]

Define the function that is simple harmonic oscillation

y=A Cos[ω t-ϕ];

Set ω to 2π so that the period of oscillation is unity

ω=2 Pi;

Define the parameters in terms of the initial conditions

A=Sqrt[y0^2+(v0/ω)^2];
ϕ=ArcTan[y0,v0/ω];

Make three example plotting functions

y1=y/.{y0->2,v0->0};
y2=y/.{y0->0,v0->4 Pi};
y3=y/.{y0->2,v0->4Pi};

Make the plots

Plot[{y1,y2,y3},{t,0,3},PlotLegends->{"y1","y2","y3"}]