Let displacement on y-axis is given by
y = asin ωt
Where a is the amplitude, ω is the angular velocity and t is the instantaneous time.
Then velocity is given by
v = \(\frac{dy}{dt}\) = aω cos aω = aω sin ( \(\frac{\pi}{2}\) + aω)
The above equation clearly show that displacement and velocity of a body executing S.H.M. are out of phase by \(\frac{\pi}{2}\).