in engineering and thermodynamics, a heat engine converts heat energy to mechanical work by using the temperature difference between a hot "source" and a cold "sink". heat is transferred from the source, through the "working body" of the engine, to the "sink", and in this process some of the heat changes into work by using the qualities of the gas or liquid inside the engine.