Condensation is the change of a gas into a liquid. This occurs when a gas loses heat to its surroundings.
The gas molecules lose kinetic energy as they lose heat, so they move less vigorously.
When they become unable to overcome the intermolecular attractive forces, the molecules move closer to each other and condense to form a liquid.
A gas starts condensing at its boiling point. The temperature remains constant during the process of condensation because only potential energy decreases.
The heat removed during condensation is therefore latent heat.