If you need to work on your cars engine, exhaust, or parts connected to these, you must wait to allow these components to sufficiently cool down first.
It typically takes around 45 minutes to an hour for most external parts of the engine to cool down to a level which is safe to touch. For the coolant, it may take 1-2 hours to cool to a safe level. For components deep in the engine, it may take 5-6 hours.
The exact amount of time it takes is determined by a number of factors, including the following.
The ambient temperature
The quantity of insulation surrounding the engine
Coolant volume in the engine
How hot the engine, coolant, and oil was when switched off
The material used in the engine construction (i.e. aluminium cools quicker than steel)
A significant amount of residual heat from the engine is still passed to the coolant after the engine is switched off, this is why the coolant stays warm for a long time.
Since the water pump and radiator fans don't run for very long after an engine is switched off, there is less significant airflow through the radiator and the cooling system's ability to remove heat from the coolant is now purely passive.
If you're changing coolant you should wait 3-5 hours, if you're changing engine oil you could wait just 30-45 minutes, this is because oil is thinner and drains better when it is warmer.