The cylinder head sits above the cylinders and consists of a platform containing part of the combustion chamber and the location of the valves (on four-stroke engines) and spark plugs. In a flathead engine, the mechanical parts of the valve train are all contained within the block, and the head is essentially a flat plate of metal bolted to the top of the cylinder bank with a head gasket in between; this simplicity leads to ease of manufacture and repair. This design requires the incoming air to flow through a convoluted path, which limits the ability of the engine to perform at higher rpm, leading to the adoption of the overhead valve head design.
In the overhead valve head, the top half of the cylinder head contains the camshaft in an overhead cam engine, or another mechanism (such as rocker arms and pushrods) to transfer rotational mechanics from the crankshaft to linear mechanics to operate the valves (pushrod engines perform this conversion at the camshaft lower in the engine and use a rod to push a rocker arm that acts on the valve). Internally the cylinder head has passages called ports for the fuel/air mixture to travel to the inlet valves from the intake manifold, for exhaust gases to travel from the exhaust valves to the exhaust manifold, and for antifreeze to cool the head and engine.
The number of cylinder heads in an engine is a function of the engine configuration. A straight engine has only one cylinder head. A V engine usually has two cylinder heads, one at each end of the V, although Volkswagen, for instance, produces a V6 called the VR6, where the angle between the cylinder banks is so narrow that it utilizes a single head. A boxer engine has two heads.
The cylinder head is key to the performance of the internal combustion engine, as the shape of the combustion chamber, inlet passages and ports (and to a lesser extent the exhaust) determines a major portion of the volumetric efficiency and compression ratio of the engine.