A heat
engine is a device that converts heat into mechanical energy or work. This
picture shows a very simple heat engine. The air in (B) has been heated,
increasing the molecular motion and thus the pressure. Some of the heat is
transferred to the increased gravitational potential energy of the weight as it
is converted to mechanical energy.