Rain is formed in clouds due to water vapor that evaporates from the earth.
Water on the ground gets up into the sky through evaporation and when those water droplets get into the air they form into the clouds and then return eventually to the earths ground in the form of rain, snow sleet etc depending on the temperature outside.
When the water vapor rises up in the air, it then condenses and starts to cool down which causes it to turn back into a liquid.
The water droplets then stick together to form clouds.
Snow and sleet or ice coming down is just basically frozen rain and the rain freezes before it hits the ground so you have ice, snow or sleet.