If the temperature is below freezing, clouds release snow rather than rain. However, if the falling snow hits any pockets of air that are warmer than 32 F, that warm air turns the snow into rain. If the rain hits any cold pockets of air, it does not turn back into snow but into freezing rain or sleet.
When trying to establish whether to expect rain or snow, one cannot simply look at the ground temperature. Instead, people need to consider the temperature in the air, and they need to be aware that the temperature may be different in different layers of the Earth's atmosphere. The temperatures in these layers affect what form the precipitation takes.