use x=Asin(wt) if the oscillation is starting from the equilibrium position (b/c if u look at a sin curve, it starts at a value of 0), and if it is starting at the amplitude, use x=Acos(wt). (b/c looking at a cosine curve, it starts at the amplitude) But since sin and cos are really the same functions except shifted over, these two equations are both true and essentially mean the same thing.
. f(x) is the projection of a particle moving in a uniform circular motion with radius A and angular velocity ω. If you take the projection on x-axis, then f(x) = Acosωt. Ιf you take the projection on y axis, then it is f(x) = Asinωt