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 .
In other words , a heat engine absorbs heat energy from the high temperature heat source , converting part of it to useful work and delivering the rest to the cold temperature heat sink .