How
Precipitation works when the sun's heat evaporates the tops of lakes and oceans the water goes to the clouds and either freezes in different forms or stays the same. Warm air holds more water than cold air. When warm air cools all the moist air condenses to liquid - and it rains. The rain can either freeze in the cloud basically the water shock freezes in the cloud or it could freeze before it hits the ground. For sleet the temperature usually rises and the snow flake melts before it hits the ground.