There are many levels of the atmosphere, however, most of our weather on Earth takes place in what's called the Troposphere. This is the layer from the surface to 5 miles near the north and south pole, to 12 miles near the equator.
If you think of the atmosphere like a layered cake, there are some layers that are warm, some cold. Other layers are dry, where some are very wet.
To examine the layers, meteorologists use a weather balloon and a radiosonde that takes measurements and transmits the data back to meteorologists on the ground.
Typically, the higher you go in altitude the colder it gets. In towering thunderstorms, temperatures can drop well below freezing, which is where hail forms.