What determines wether precipitation is rain or snow?

Is rain,fog, and snow examples of precipitation