how does covering a cup of coffee prevent heat escaping?

A scientific explanation please?

Covering up a coffee cup lowers the rate at which energy can escape from the cup. It does this through a combination of a few things, the most important is lowering the amount of heat removed through convection.

Convection is the mode of heat transfer involved with flowing gases and fluids. The amount of heat it can remove (i.e. how fast it cools the coffee) is very much dependent on the temperature difference between the flowing gases and in our case, the coffee. The higher the temperature difference, the faster they would cool (makes sense, right). When you put a lid on the coffee, you have trapped the heated air inside the coffee mug. As a result, the temperature of the air rises until the temperature of the air and the temperature of the coffee are practically the same. Using our above reasoning, we know that the coffee cannot cool down from the air anymore since they are both at the same temperature.

However, if you leave the mug uncovered, you allow fresh, cool room temperature air back into the mug. This means that the temperature difference between the flowing air and the coffee causes the coffee to cool down.

Another reason hot coffee will cool down is because the heat of vaporization of the liquid coffee. The heat of vaporization is the amount of energy required to make a liquid phase change to a gas. This removes energy from the coffee, making it cooler.

When you leave the coffee uncovered, the coffee vapor is allowed to escape to the environment. Liquids will continually evaporate gases until it reaches a equilibrium point (noted by the substances "vapor pressure"). It would take alot of coffee to fill up a whole room with coffee gases, so that it would stop evaporating. However, putting a lid on the coffee traps the evaporation and the coffee will stop evaporating MUCH sooner (remember, less evaporation means stays hotter longer).

Hope this helps.