A simple pendulum is the most common example of the body executing *.H.M, it consist of heavy point mass body suspended by a weightless inextensible and perfectly flexible string from a rigid support, which is free to oscillate.
Let m = mass of bob
l = length of pendulum
Let O is the equilibrium position, OP = X
Let θ = small angle through which the bob is displaced.
The forces acting on the bob are:-
1) The weight = M g acting vertically downwards.
2) The tension = T in string acting along Ps.
Resolving Mg into 2 components as Mg Cos θ and Mg Sin θ
Now,
T = Mg Cos θ Restoring force F = - Mg Sin θ
- ve sign shows force is directed towards mean position.