Temperature in the Troposphere
The troposphere, the lowest layer of Earth's atmosphere, is heated from below. The troposphere is warmest at the bottom near Earth's surface. The troposphere is coldest at its top, where it meets up with the layer above (the stratosphere) at a boundary region called the tropopause. Temperatures drop as you move upward through the troposphere.
Sunlight streams down from space through the atmosphere, striking the ground or ocean beneath. The sunlight heats the surface, and that surface radiates the heat into the adjacent atmosphere. Atmospheric scientists use a concept called a "standard atmosphere" to represent an average atmosphere with variations caused by weather, latitude, season, and so forth, removed. In the standard atmosphere model, the temperature at sea level at the bottom of the troposphere is 15° C (59° F). Higher up in the troposphere, where less heat from the surface warms the air, the temperature drops. Typically, the temperature drops about 6.5° C with each increase in altitude of 1 kilometer (about 3.6° F per 1,000 feet). The rate at which the temperature changes with altitude is called the "lapse rate". In the standard atmosphere, by the time you reach the top of the troposphere the temperature has fallen to a chilly -57° C (-70° F).
Of course, the atmosphere is always changing and is never "standard". Temperatures in the troposphere, both at the surface and at various altitudes, do vary based on latitude, season, time of day or night, regional weather conditions, and so on. In some circumstances, the temperature at the top of the troposphere can be as low as -80° C (-110° F). When a weather phenomenon called at "temperature inversion" occurs, temperature in some part of the troposphere gets warmer with increasing altitude, contrary to the normal situation.
In the layer above the troposphere, the stratosphere, temperature rises with increasing altitude. In the stratosphere, the air is heated from above by ultraviolet "light" which is absorbed by ozone molecules in the air. The tropopause is the boundary between the troposphere (below) and the stratosphere (above). The tropopause occurs where the temperature stops dropping with increasing altitude (in the troposphere) and begins climbing with increasing altitude (the stratosphere).