Most cooling systems from the 1950s onward are pressurised. As they heat up, the coolant and air above it in the radiator expands. The pressure builds up and suppresses the boiling of the coolant. Water can be taken to about 107°C at 4psi above atmospheric pressure and to 121°C at 15psi above.
The cap regulates the maximum pressure, preventing damage to the hoses and radiator. After turning the engine off, the system cools and the coolant contracts significantly. The cap therefore has a return valve that admits air from the atmosphere or coolant from an expansion tank, if fitted.
The radiator  is closed by the cap’s seal . A spring  bears against the cap, holding down the pressure valve  fitted with a rubber seal. As pressure builds up, the spring and valve are forced up, allowing air (and coolant) to escape to the overflow.
As the engine cools, a vacuum forms in the top of the radiator. Atmospheric pressure forces open the lightly-loaded return valve and spring , allowing air to be drawn back through the overflow and into the radiator. If an expansion tank is fitted, only liquid is expelled and drawn back through the overflow. The radiator thus remains permanently filled with coolant.
WHAT GOES WRONG?
Springs corrode, weaken and eventually break. The system no longer pressurises completely (or at all) and coolant will be lost, leading to overheating problems on the road.
The cap’s internal elements are made from brass. This can fracture, leading to disintegration and consequent leakage and overheating on fast runs. Failed rubber seals will give the same trouble.
Rated pressures vary from 4psi to 15psi. You’ll need the correct cap for your car (consult your manual). Overpressure caps will blow hoses, strain radiator seams and displace core plugs.