Here is a scenario of how condensation works:
Put a pot of water on the stove and bring it to a boil. Take a dry lid and cover it for a minute, and lift the lid. What happens? Water droplets run down the lid and fall into the pot. That is what happens during condensation.
Condensation is the process by which water vapor (gas) in the atmosphere turns into water (liquid state). It is the opposite of evaporation. This stage is vital because it is the cloud formation stage. Cooler temperatures are essential for condensation to happen because as long as the temperature in the atmosphere is high, it can hold the water vapor and delay condensation.
Why does condensation occur?
Condensation occurs because of temperature differences. For condensation to happen, there must be water vapor (higher temperature). When vapor comes into contact with lower (cooler) temperatures, the vapor is forced to change from gas state to liquid state.
This is what happens in cloud formation in the atmosphere.
As water vapor rises into the atmosphere, they mix up with very tiny particles of dust, soot, and salt, which are all particulate matter in the atmosphere. These particles are called aerosols. As the surrounding temperatures fall, the water vapor turns into very tiny particles of water and ice crystals. The water particles bump into the aerosols and stick together. As more and more water particles and aerosols stick together, clouds are formed. This process is known as coalescence. Cloud droplets can range from sizes between 10 microns to about 1 millimeter.
Soon, there is so much moisture in the atmosphere, far more than the air in that region can take. Here, we say there is saturation, and the water/ice crystals are ready to come down in the form of precipitation.