When water vapor cools, it condenses. It is a phase change where water changes from a gas to a liquid. Condensation is the opposite of evaporation.
In the atmosphere, moisture condenses to form clouds at higher levels. When it condenses near the surface, fog forms. Many of these droplets of moisture join and form raindrops. In the atmosphere, water is continually evaporating and condensing. When there are no clouds present, the rate of evaporation exceeds the condensation rate.
Contrails are water vapor that has condensed from the exhaust of a jet plane to form a long thin cloud. Contrails can help to predict the weather. If they disappear quickly or do not form, the weather is likely to remain clear. When contrails remain long after the plane is gone, a storm is approaching.