The water, or hydrologic, cycle has only a few basic steps, beginning with evaporation of the water in rivers, lakes and oceans into water vapor, which then condenses into clouds. When enough water vapor condenses in the clouds, it then turns into either liquid water or ice. This then falls back to the ground through precipitation as either snow or rain, which will eventually evaporate again.
The sun plays a primary role in the hydrologic cycle, as it is the heat from the sun that causes water to evaporate in the first place. Air currents also play an important role, as they are responsible for carrying the water vapor into the atmosphere.
The cooler temperatures in the atmosphere are then responsible for condensing the water vapor into clouds. Air currents also play another role as they move the clouds around the atmosphere, causing them to collide. When clouds collide and the water vapor accumulates, it eventually becomes too heavy and falls back down as precipitation.
The water that falls to the ground then begins a cycle of its own, with most of it eventually flowing back out to the ocean due to the effects of gravity. In addition, some precipitation falls on ice caps and glaciers, where it can remain frozen for thousands of years.