Convection is one of the three ways of heat transfer. The phenomenon of convection occurs in fluids. This phenomenon is the transport of portions of the mass of the fluid, between areas with different temperatures.
When a fluid is heated, the Intermolecular distances increase; so, it becomes less dense. So the cooler portion of the fluid is more dense and heavy, and will descend. A portion of the fluid which is more hot is less dense and less heavy; therefore it tends to rise. Thus, in the fluid is produced, there is a constant movement of mass that conducts heat to all its parts.
The convection of air masses from the atmosphere, which are warmed by the Sun and by the contact with the surface of the Earth, is one of the causes of the winds.