SHM is governed by the following equation:- $$\ddot x+\omega^2 x=0$$ Here $\omega$ is a positive constant which is also known as angular frequency of simple harmonic motion and $x$ is the displacement from the mean position.
The diagram given in the post gives an analogue of simple harmonic motion which simplifies the problems we deal with but the above definition clearly convinces us that the net force is always directed towards the equilibrium position and is proportional to its distance from the mean position.