A piston is a sliding plug that fits closely inside the bore of a cylinder. Its purpose is either to change the volume enclosed by the cylinder, or to exert a force on a fluid inside the cylinder. The piston is an important component of piston engines and hydraulic systems.
In an Otto or Diesel engine, the concave head of the piston forms one wall of an expansion chamber inside the cylinder. The opposite wall, called the cylinder head, contains inlet and exhaust valves for gases.
As the piston moves inside the cylinder, it transforms the energy from the expansion of a burning gas (usually a mixture of petrol or diesel and air) into mechanical power (in the form of a reciprocating linear motion). From there the power is conveyed through a connecting-rod to a crankshaft, which transforms it into a rotary motion, which usually drives a gearbox.