How is simple harmonic motion related to Hooke law?

A particle is said to be in simple harmonic motion if it satisfies the following differential equation:

$\ddot{x} + {\omega}^{2} x = 0 ,$

where $x$ is the position of the particle, $\ddot{x}$ is it's second derivative with respect to time (the acceleration) and $\omega$ is a constant that gives us the angular frequency of the oscillation.

Hooke's law is a model for the behavior of ellastic materials, such as a spring (and is only valid if the material does not suffer strong deformations). It states that the magnitude of the force $F$ is proportional to a certain displacement $x$ (with respect to an equilibrium position), with the proportinality given by a constant factor $k$. Additionaly, the force is a restoring force, that is, it's direction is opposite to the direction of the displacement vector:

$F = - k x$

Newton's second law states that the force $F$ acting over a particle is equal to the product of it's mass $m$ and it's acceleration $\ddot{x}$, or:

$F = m \ddot{x}$

This two equations give us the relation

$m \ddot{x} = - k x$

Rearranging, we get:

$m \ddot{x} + k x = 0$

Divind by the mass $m$, we have:

$\ddot{x} + \frac{k}{m} x = 0$

Associating the ${\omega}^{2} = \frac{k}{k} m$ (which gives us the expression $\omega = \sqrt{\frac{k}{m}}$ for the angular frequency) gives us the equation for simple harmonic motion.

Therefore, any system that satisfies Hooke's law and isn't acted upon by any other forces is in simple harmonic motion.