Condensation forms when warm air meets a cold surface, causing the air to cool and lose its capacity to hold moisture. As a result, the excess moisture in the air transforms into water droplets that accumulate on the cooler surface.
This process is similar to how water droplets form on the outside of a cold drink glass on a hot day. Condensation most commonly occurs on windows, mirrors, and other surfaces where the temperature difference between the surrounding air and surface is most disparate. However, condensation can also occur on walls and ceilings too, creating an environment that is conducive to mould growth.