If no energy is lost to heat, it remains constant is potential energy stored in the spring is exchanged with kinetic energy of mass in motion during each cycle.
This is what thermal energy "looks" like: Random motion and random compression of atoms behaving almost as springs.
More heat flows out of something hot than flows into something cold. The difference in energy (called W) can be used to drive a mechanical motor. That might explain why motors and people overheat when they work too hard.
Announcements
Each subpage is devoted to a chapter of Matthew Raspanti's original work. Click the image of the pdf file shown to the right to read the chapter.