A piston engine, also known as a reciprocating engine, works by expanding hot gases (a mixture of air and fuel) within a cylinder in order to push a piston, which in turn rotates a crankshaft and generates power. Unlike early steam engines, modern piston engines do not require an external source of hot gases, hence they are known as internal combustion engines.
The movement of the piston is called a stroke. Piston engines are categorized by the number of strokes required to complete one power cycle, as well as the speed of the crankshaft (revolutions per minute, or rpm). The four-stroke engine, for instance, requires four movements of the piston before the sequence of firing the engine repeats.
There are two types of piston engine that employ internal combustion: 'spark-ignited' (or SG) and compression-ignited (diesel).
In spark-ignited piston engines, the air-fuel mixture is injected via a spark plug at the top of the cylinder. This is based on the Otto cycle, in which the fuel requires an internal spark in order to reach the required temperature to burn.
Conversely, the diesel cycle, which is employed by compression-ignited piston engines, raises temperature by compressing air. When the fuel is introduced to the cylinder, the temperature is already hot enough for it to burn, with the expansion forcing the piston down.