A heat engine is a machine used to extract heat from a source and then convert it partly into work in the form of mechanical energy. The components of a heat engine are a hot reservoir acting as the source, a working substance for heat transfer during cyclic operation, and a cold reservoir acting as the sink. When the working substance extracts heat from the source, only a significant part of the heat is utilized to do some useful work, and the remaining heat is transferred to the sink. In an ideal reversible heat engine, the change in the internal energy of the system is zero. Using the first law of thermodynamics, an expression for work extracted from the heat engine is obtained. The thermal efficiency of the heat engine is given as the ratio of this work to the amount of heat absorbed from the source. In practical heat engines, this efficiency is always less than unity as it is impossible to convert all the heat into work; there is always some heat loss.