Conservation of mechanical energy on spring 
Suppose the mass moves from compressed position to stretched position as shown in the figure. Then by applying mechanical energy conservation at stretched position what is the cause for the bulid up of kinetic energy? Is it the loss of potential energy from going from compressed to equilibrium?
 A: In the compressed condition, the spring applies a force on the block towards the equilibrium position due to the deformation caused by an external agent. The external agent does some work to cause this deformation which is stored as the spring's initial potential energy.
$$ Potential\space energy \implies Deformation \implies Spring\space Force$$
The spring force is the agent that does the work on the block. This is the only force that exists in this case and it only comes into the picture when there is some deformation. For a deformation of '$x$' units from the equilibrium position, the spring force is given as,
$${\vec{F}}_{spring}=-k\vec{x}$$
When you (external agent) let go of the block, the spring force does positive work on the block at expense of the initial potential energy.
At the eqm. position, the potential energy of the spring is zero. But the initial potential energy must have gone somewhere. The spring's potential energy has been exhausted and completely converted into kinetic energy of the block. This is what energy conservation says.  
If there is net force, there is acceleration.  However, it doesn't necessarily mean that if a force is acting on a body, the body will always have non-zero speed. The force could be acting in the direction opposite to the direction of initial motion and keep depleting the body's kinetic energy and finally bringing it to rest and begin accelerating the body in its own direction. This is exactly what happening here.
The block, after reaching equilibrium, due to its kinetic energy will get past the eqm. position. When this happens, the spring starts getting extended and spring force comes into the picture again. 
But this time spring force does negative work and this work takes away the kinetic energy and completely transform it into potential energy.
$$W_{spring}=-\Delta U=\Delta KE$$
When the spring does positive work, potential energy gets converted into kinetic energy and when the spring does negative work, kinetic energy gets converted into potential energy. This is the nature of conservative forces. 
$$W_{conservative}=-\Delta U$$
More generally, when conservative forces, like spring force, do positive work the potential energy of the system decreases. Similarly, when they do negative work the potential energy of the system increases. This is evident from the above relation.
A: The loss is cause by mass in the atoms when expanding from the compressed state and returning from the stretched out state resulting in an equilibrium. The more compressed it is the more massive it is and you are just releasing mass's force when not held down. Not energy just mass. 
