Caption: An animation of a simple harmonic oscillator exhibiting simple harmonic motion.
Features:
The x, v, and a arrow symbols give the directions of the vectors and their lengths, the magnitudes.
The system is ideal, and so there is NO dissipation of mechanical energy to waste heat by friction external at the contact surfaces or internal to the spring.
The Hooke's law force always pulls the object toward the mechanical equilibrium point where the Hooke's law force is zero.
Pulling in opposite the direction of motion slows down the object and changes its kinetic energy into Hooke's law force potential energy.
The energy keeps switching back and and forth between kinetic energy (1/2)mv**2 and Hooke's law force potential energy (1/2)kx**2, where m is the object and k is again the spring constant.
The total mechanical energy E is conserved: i.e., E = (1/2)mv**2 + (1/2)kx**2 is constant.
If there was dissipation, the system would exhibit damped harmonic motion and eventually would stop moving with the object at rest at the mechanical equilibrium point.