The troposphere is the lowest layer of Earth's atmosphere. The troposphere extends from Earth's surface up to a height of 7 to 20 km (4 to 12 miles, or 23,000 to 65,000 feet) above sea level. Most of the mass (about 75-80%) of the atmosphere is in the troposphere, and almost all weather occurs within this layer. Air is warmest at the bottom of the troposphere near ground level. As one rises through the troposphere the temperature decreases. Air pressure and the density of the air also decrease with altitude. The layer immediately above the troposphere is called the stratosphere.
The troposphere is heated from below; sunlight warms the ground or ocean, which in turn radiates the heat into the air immediately above it. Temperature drops off at a rate of about 6.5° C per km (about 3.6° F per thousand feet) of increased altitude within the troposphere. This is why mountaintops are much cooler than lower elevations nearby. Since warm 'parcels' of air are less dense than colder air, warmer air is buoyant and tends to rise up from Earth's surface towards the top of the troposphere. If you've ever watched cumulonimbus thunderstorm clouds form and grow on a hot summer day, you've seen this rising air in action. The air in the troposphere is 'well mixed' because it is constantly churning and 'turning over' as warm air at the surface rises and colder, denser air at altitude descends to take its place. This is not the case for all layers in the atmosphere. At the top of the troposphere the temperature drops to a chilly -55° C (-64° F)!
The boundary between the top of the troposphere and the layer above it, the stratosphere, is called the tropopause. The height of the tropopause (and thus the top of the troposphere) varies with latitude, season, and between day and night. The troposphere is thickest in the tropics, where the top of the layer can be as high as about 20 km (12 miles or 65,000 feet) above sea level. At mid-latitudes, the typical height of the tropopause is around 11 km (7 miles or 36,000 feet), while near the poles it can dip down to as low as 7 km (4 miles or 23,000 feet). The jet stream, a fast-moving "river of air" that can zip along at speeds up to 400 km/hr (250 mph), is located just below the tropopause.
Air gets 'thinner' with increasing altitude. That's why mountain climbers sometimes need bottled oxygen to breathe, and why it is so easy to get 'winded' while hiking in high mountains or even visiting someplace at elevation.
The lowest part of the troposphere, right next to the surface of Earth, is called the "boundary layer". Differences in the surface texture (mountains, forests, flat water or ice) affect winds in the boundary layer. Above the boundary layer, the wind speed is much less affected by the details of the surface below.