Image from the British Leyland Workshop Manual
Any expansion and contraction of fuel or air in the tank while the engine is switched off moves through the expansion/separator tank (early systems, 4) or separator tank (later systems, 7), vapour lines (3, 5), the charcoal adsorption cylinder (8) and the vent pipe (11) to/from open air. Petrol fumes from the vapours are adsorbed by the charcoal and not discharged to the atmosphere. If the engine is running any fumes from expansion are drawn into the engine and burnt, see Crankcase Breathing.