Liquid water consists of water molecules that are held near each other by attractive forces but are still free to move around among one another. Also, water molecules have thermal energy, in the form of extremely fast vibrations. Water molecules at a water surface occasionally vibrate so strongly that they fly out into the air to become vapor. At the same time, water molecules in the air occasionally crash back onto the water surface to join the liquid water. These motions are occurring all the time at the water surface.
When the concentration of water molecules in the air is less than the maximum the air can hold, the relative humidity is less than one hundred percent. Then the number of molecules that go from the liquid to the air is greater than the number that goes from the air to the liquid. That condition is known as evaporation. Evaporation causes cooling of the remaining liquid water. The reason is that the water molecules that fly out into the air are, on average, the ones with unusually high thermal energy. What is left behind has a little less thermal energy-in other words, it has a slightly lower temperature.
Condensation is the opposite of evaporation. If the air has even slightly more water vapor than it can hold, the number of water molecules passing from the air into the liquid water is greater than the number passing from the liquid water into the air. When you fill a glass with ice water on a warm and humid day, soon the glass has drops of water on the outside of the glass. That water has not leaked through the glass. It has condensed from the air. Cold air can hold less water vapor than warm air. The cold glass chills the air next to it, causing condensation. Dew on the grass on a chilly morning forms in the same way, when the ground surface is chilled by radiating its heat out to space on a clear night.