The water, or water vapour as it is more scientifically called, gets into the air by evaporation. Plants also lose water through their leaves and stems, and this follows the same path into the sky.
Before rain can fall the air must cool so that the water vapour can condense. This means that it turns into water droplets. For example, when you bath some of the steam that rises from the hot water forms a thin film of water on the mirror or the window. It is a little more complicated than just cooling, however. Water vapour needs to have something to form on so that it can condense into droplets. In the air, this is usually the tiny particles of dust which are ever present. This means, of course, that our industries can affect the rainfall in an area because of the smoke and other substances which usually accompany them.
The clouds which develop from these water droplets are of many different kinds, and not all of them will give rise to rain. You may have noticed some of the kinds of clouds. They have interesting names like stratus or cumulonimbus.
If you have ever spend a holiday in an area where there are high hills or mountains, it is likely that it will have been cloudy or have rained a lot. This is because the air which flows across the hills forces rapidly upwards by them, causing it to cool as it expands. And if this air is very moist as it is the water quickly condenses so that this area will usually have a very high rainfall.
Clouds are formed, but this does not explain why this water should suddenly fall as rain, or even snow or hail. The main difference between a cloud droplet and a raindrop seems to be size – a cloud droplet is very tiny and floats in the air and a raindrop is large and heavy enough to fall as it is pulled by gravity. It is not easy to see why the droplets should grow to raindrop size but one reason may be that there are always a few larger droplets present which may fall and bump in other droplets to grow still larger, and so on.