Modern radiator caps have two seals, the blow off tube is located above the lower seal and inside the space between the two seals, allowing the expanding coolant to flow out to a tank.
When things cool down, a check valve opens and allows the coolant to get sucked back into the system.