Simple harmonic motion is not just to and fro motion - it is to and fro motion where the displacement from the central position over time follows a sine wave. There are other types of to and fro motion which are not simple harmonic motion - for example, where the displacement from the central position over time follows a triangle wave rather than a sine wave.
The connection with uniform circular motion is that simple harmonic motion is the projection on the x-axis of the position of an object moving with uniform circular motion in the x-y plane. If the object is moving in a circle of radius $R$ with frequency $f$ then at time $t$ its position is
$\left(R\sin (2\pi f t), R\cos (2\pi f t)\right)$
so the projection of its position on the x-axis is $R \sin(2\pi f t)$. A particle moving with simple harmonic motion $x(t)=R \sin(2\pi f t)$ is said to be moving with frequency $f$ because it takes $\frac 1 f$ seconds to move from one extreme point $x=R$ to the opposite extreme point $x=-R$ and back again.