Water evaporates from the surface of the earth and through the leaves of the plants and trees by absorbing the heat energy from the surrounding.
This water then converts into vapour and goes up into the atmosphere where the temperature is low in the troposphere and condenses to form the clouds. During the cloud formation the heat form the vapour is absorbed in the troposphere.
These clouds when get saturated then fall in the form of precipitation of water, snow etc. Replenishing back the water of the earth.