An engine is a device for converting stored energy into useful work. Most engines in use today are heat engines, or combustion engines. which convert heat into work, though the efficiency of this process, being governed according to the second law of thermodynamics is often very low. Heat engines are commonly classified according to the fuel they use (as in gasoline engine), by whether they burn their fuel internally or externally, or by their mode of action (whether they are reciprocating, rotary, or reactive). They are distinguished from electric motors which, in providing their power, do not directly alter the chemical or physical composition of a substance.
Combustion engines are of two main kinds. An external combustion engine burns its fuel outside the chamber in which motion is produced. In the steam locomotive, for example, the fire box is separate from the cylinders. An internal combustion engine burns its fuel and develops motion in the same place. In the gasoline engine, for example, this all takes place in the cylinders.