Read the IG post on Hooke’s law before proceeding. Check out a Mass Spring Oscillator as a moving .GIF.
In order for mechanical oscillation of a mass/spring system to occur, it must possess two quantities: elasticity and inertia. When the system is displaced from its equilibrium position, elasticity provides a restoring force such that the system tries to return to equilibrium. The inertia property – resistance to changes in motion – causes the system to overshoot equilibrium. This constant interchange between elastic and inertial properties is what allows oscillatory motion to occur. The natural frequency of the oscillation is related to both the elastic and inertia properties. Weak, springy springs (small elastic restoring force) with large weights (large inertia) on them have a long time period and vice-versa.
The weight of the added mass acts vertically downwards, the restoring force on the spring acts upwards.
The elastic constant of the spring is k.
At any other displacement, the acceleration = a
When the mass is displaced downwards the restoring force acting on it, F, is of magnitude kx, upwards. (kx is larger than weight)
If it is displaced upwards the net force (and acceleration) is downwards (kx is smaller than weight)
A graph of T² against m is linear through the origin with slope = 4π²/k