Formation of a liquid or solid from its vapour. Condensation usually occurs on a surface that is cooler than the adjacent gas. A substance condenses when the pressure exerted by its vapour exceeds the vapour pressure of its liquid or solid phase at the temperature of the surface where the condensation is to occur. The process causes the release of thermal energy. Condensation occurs on a glass of cold water on a warm, humid day when water vapour in the air condenses to form liquid water on the glass's colder surface. Condensation also accounts for the formation of dew, fog, rain, snow, and clouds.