Energy is the capacity to produce changes in the environment by doing work or transferring heat. This means that when a body transfers heat or does work, its energy decreases. Energy is measured in Joules (J) in the international system of units.


Heat is the energy transmitted between two bodies as a consequence of a temperature difference between them. The hotter body always loses energy and the colder one always gains it.


 
Work is done on a body or material system when a displacement is produced by a force which is acting (totally or partially) in the direction of that displacement.

Heat is one of the ways in which material systems modify their energy

 

material systems modify their energy by doing work

Water is at a greater temperature than ice. Therefore, the latter takes energy (heat) from the former. The energy of water decreases and the energy of ice increases.
 
The athlete exerts a force in the direction in which he wants to move the weights. As the weights move upwards, the athlete is doing work, his energy is decreasing and the energy of the weights is increasing.