The temperature decreases with height in the troposphere. The troposphere is the lowest layer of the Earth's atmosphere, which extends from the surface up to about 7-20 kilometers depending on the location. The reason for the decrease in temperature with height in the troposphere is because the air is heated by the Earth's surface, and as you go higher, the air becomes thinner and less able to retain heat.
In other layers of the atmosphere, such as the stratosphere, temperature can actually increase with height due to the presence of certain gases that absorb radiation from the sun. In the ionosphere and exosphere, the temperature can vary widely depending on the level of solar activity and other factors.