Forms of Energy
Energy can be neither created nor destroyed, only converted from one form into another.
These are the words of the First Law of Thermodynamics and represent an important advance on the idea of 'conservation of work'.
It was quickly found that a neat conversion of potential energy into kinetic energy and back again was not always that simple. Rapid movement, for example, caused an object to heat up, and the heat produced by the friction of one object against another seemed to 'rob' some of the potential energy during the conversion to kinetic energy. Heat popped up all over the place. Exercise hard and the body becomes hot and sweaty. Saw a log of wood in half and the saw blade becomes warm to the touch.
Heat, it seemed, was a product of many processes in which 'stored-energy' was converted into 'motion-energy'. This idea was investigated by an English brewer called James Prescott Joule in the 1840's. He measured the amount of heat produced by a wide variety of processes including an electric current, friction of water against glass, compressing gas in a cylinder and turning wheels in water.
It became clear to Joule that, if the 'law of conservation' was true, then heat must be considered a form of energy. So that a conversion of potential energy (stored-energy) into kinetic energy (motion-energy) also produced some heat-energy. If 100 units of potential energy were involved in the conversion, and only 80 units of kinetic energy were recovered, the missing 20 units of energy could be found as heat.
Joule's work also could be taken a step further. If the conservation law were true, then any phenomenon capable of producing heat would also have to be considered a form of energy. Electricity can be converted into heat (an electric fire, for example), so electricity is a form of energy. Sunlight can warm up a concrete sidewalk, so light is a form of energy. All these forms of energy could be converted into heat, and many could be inter-converted amongst themselves (electricity becoming light, etc.).
So the 'law of conservation of work' became a much broader law, the 'law of conservation of energy'. Joule probably understood this concept, but it was a German physicist and biologist Hermann von Helmholtz who explicitly stated this law in it clearest form in 1847, so he is generally given the credit for its discovery.