When the water vapour rises, it starts cooling. The water vapour condenses causing formation of droplets of water. Clouds are masses of such water droplets. When these droplets of water become too heavy to float in air, then they come down as precipitation or rain.