Humans can survive up to about 20,000 ft (3.8 miles) above sea level. Above about 20,000 ft, the human body begins to suffer a condition called hypoxia in which the brain does not receive sufficient oxygen for long-term survival. The problem is that above 20,000 ft the air density is too low. Although the air at 20,000 ft still contains about 21% oxygen, but the number of air molecules per volume is too small. To understand why this is a problem, you need consider how breathing works.
Just before inhalation, the air pressure inside your lungs equals the atmospheric air pressure outside. When you take a breath, muscles work to expand your lungs (increase the volume in your lungs). Increasing the volume of a container of air will cause the air pressure inside the container to decrease (rate of collision between air molecules and container decreases). With lower air pressure inside your lungs compared to outside, outside air rushes into your lungs until the air pressure inside your lungs equals the air pressure outside (the atmospheric pressure). Another way to think about it is that air moves into your lungs until the air density (number of molecules per volume) inside is about equal to the air density outside. (For all you science majors, the air density inside your lungs will not precisely equal the air density outside because the air in your lungs is at a different temperature than the air outside, but it helps with the explanation).
When inhaling, you cannot compress air in your lungs to a higher pressure (or density) than the air outside. All you can physically do is increase the volume of your lungs and the difference in pressure created pushes air into your lungs. Your body extracts oxygen from the air whenever an oxygen molecule collides with the oxygen-accepting surfaces of your lungs. At high altitudes, the air density decreases, so there are fewer air molecules in the volume of your open lungs. There are just not enough collisons between oxygen molecules and the surface of your lungs to extract sufficient oxygen for bodily functions. Many people, especially those not accustomed to high elevation, begin to experience problems due to oxygen deficiency at altitudes well below 20,000 ft (altitude sickness).
In general, as people spend time at high altitudes, their bodies become acclimatized to the decreased levels of available oxygen. This is why you are instructed to spend several days at high altitude before doing any strenuous activity (such as high mountain climbing). Some athletes will train at high altitudes so that their bodies become more efficient at extracting oxygen, which gives them an advantage in performing strenuous activities during which the body has a high oxygen demand.
What about commercial jets which often fly at altitudes above 30,000 ft? Commercial airplanes are pressurized, i.e., outside air is brought in and compressed in the cabin, raising air density and pressure. The announcement "the cabin has been pressurized to a comfortable altitude" means that the cabin pressure has been adjusted to be the same as the atmospheric pressure at a lower altitude (than the plane is flying). In actual practice, commercial aircraft cabins are pressurized at takeoff and remain pressurized throughout the flight. A cabin typically is pressurized to about 75% of the average sea-level air pressure. Once the airplane has risen to a high altitude, any hole in the cabin results in air rushing out of the plane until the cabin pressure equals the outside pressure. If this occurs, oxygen masks must be used or you will not be able to live.
Although the cabin is pressurized, people commonly feel the effects of changing air pressure in a rapidly ascending or descending aircraft by a popping sensation in their ears. Rapid ascent or descent in an express elevator or on mountain roads often produces the same sensation. Ear popping is symptomatic of a natural response that helps protect the eardrum from damage. The physiological details about ear popping are described below.
The eardrum separates the outer ear from the middle ear chamber. As an air- craft takes off and cabin pressure drops, however, the air pressure on the outer ear decreases. As air pressure on the outer ear changes, the eardrum becomes distorted unless a compensating pressure change takes place in the middle ear. If the pressure does not equalize between the outer and middle ear, the eardrum bulges outward (see Figure 4.12a). On the other hand, when an aircraft descends and cabin pressure increases, air pressure in the outer ear increases. Without a compensating pressure change in the middle ear chamber, the eardrum bulges inward (see Figure 4.12b). In both circumstances, deformation of the eardrum not only causes physical discomfort, but the bulging eardrum does not vibrate efficiently and sounds are muffled. If the air pressure difference between the middle ear and outer ear continues to increase, the eardrum could rupture, perhaps causing permanent hearing loss. Fortunately, the body has a natural mechanism that alters the air pressure in the middle ear chamber. The Eustachian tube connects the middle ear with the pharynx, which, in turn, leads to the outside via the oral and nasal cavities (see Figure 4.12c). Normally, the Eustachian tube is closed where it enters the pharynx, but it opens if a sufficient air pressure difference develops between the middle ear and the pharynx.
Opening of the Eustachian tube allows the air pressure in the middle ear to quickly equilibrate with the external air pressure and the eardrum pops back to its normal shape. Vibrations of the eardrum that are associated with the rapid change in its shape are what a person hears as "ear-popping." Ear popping is thus the body's way of preventing a permanent hearing loss when experiencing a rapid change in air pressure. Yawning or swallowing hastens the opening of the Eustachian tube thereby reducing the period of discomfort. For this reason, air travelers are advised to chew gum during ascent and descent of the aircraft. On some flights, cabin attendants hand out hard candy. Chewing gum, sucking on hard candy, and even the smell and taste of these substances signals the brain, which, in turn, accelerates the release of saliva from the salivary glands (located in the jaw region). Build up of saliva in the oral cavity triggers a swallow reflex which opens the Eustachian tube and equalizes air pressure on both sides of the eardrum.