A head gasket is the gasket that sits between the cylinder head and the block. Its job is to seal the two mating surfaces of the top and bottom halves of the engine.
This means, unlike any other gasket in an engine, the head gasket has to seal oil, coolant, and compression from the cylinders simultaneously.
This makes it the most stressed gasket in an engine, and therefore one of the most likely to fail.
A head gasket needs to seal the oilways between the cylinder head and block, so that oil can freely circulate around the entire engine. It also needs to do the same with the waterways, so that coolant can also circulate freely around the engine.
But what makes a head gasket different from any other gasket is that it also needs to seal the cylinder to prevent the engine losing compression. Inside an engine you have a piston going up and down within a cylinder.
On top of the cylinder you have the cylinder head, which allows the fuel/air mixture to enter, and the exhaust gases to leave via inlet and exhaust valves.
Without a good seal between the cylinder head and the cylinder, when the piston rises on the compression stroke some of the air/fuel mixture will be able to escape, resulting in a loss of compression.
In order to form a good seal around the top of the cylinder, the head gasket features steel rings, known as fire rings. These are actually crushed when the cylinder head is tightened onto the engine block to provide a seal capable of dealing with the high temperatures and pressures involved.
This is why you must always tighten to the head bolts to the required torque settings; too tight and the gasket will be crushed too much to form a proper seal, too loose and it won’t seal enough.
Most modern head gaskets are made from multiple layers of steel (MLS). Typically these use three steel layers; the centre layer is slightly thicker, while the two thinner outer layers are coated in rubber-like high temperature and chemical resistant polymers (most commonly Viton) which helps the contact faces seal against the cylinder head and engine block.
Earlier head gaskets were often made from composite material (often referred to as fibre head gaskets), typically graphite-based coated in a wax-like finish, and with beads of silicone around the waterways and oilways to aid sealing.
These, older, composite head gaskets are more prone to failure than modern MLS gaskets, but many MLS replacements are now available for older engines that would have been produced with a composite gasket when new.