Water exists in three different states in the atmosphere – vapour, liquid, and ice. There is a different amount of energy contained within the molecules in each state.
When water changes from one state to another, energy must be either released or absorbed. This energy comes in the form of heat, so heat is released when water moves to a lower energy state and heat is absorbed when moving to a higher energy state.
When water vapour condenses to form liquid water, or when liquid water freezes to form ice, heat is released into the atmosphere. Ice melting to create liquid water or liquid water evaporating to create vapour causes heat to be absorbed by the water.
Think of when you step out of the shower and the water on your body begins to evaporate. The evaporation requires heat to be absorbed by the water and your body is a good supplier of this heat. So the evaporation absorbs heat from your skin and you begin to feel cold after a warm shower!