We all live underneath a huge ocean of air that is several miles deep: the atmosphere. The pressure on our bodies is about the same as ten metres of sea water pressing down on us all the time. At sea level, because air is compressible, the weight of all that air above us compresses the air around us, making it denser. As you go up a mountain, the air becomes less compressed and is therefore thinner.
The important effect of this decrease in pressure is this: in a given volume of air, there are fewer molecules present. This is really just another way of saying that the pressure is lower (this is called Boyle's law). The percentage of those molecules that are oxygen is exactly the same: 21%. The problem is that there are fewer molecules of everything present, including oxygen.
So although the percentage of oxygen in the atmosphere is the same, the thinner air means there is less oxygen to breathe.
Try using our barometric pressure calculator to see how air pressure changes at high altitudes. Or use the altitude oxygen graph to see how much less oxygen is available at any altitude.
The pictures above demonstrate the effect of altitude on barometric pressure. I sealed a plastic bottle like this one in La Paz, Bolivia, at an altitude of 3600m (about 12000ft). I then brought it home with me to Edinburgh (which is pretty much at sea level). As you can see, the pressure of the atmosphere pushing down on the bottle has caused it to collapse.
The same thing happens in reverse to sealed objects when you take them up to high altitudes. Above is a photograph of a roll-on deodourant that I sealed in London, then opened in La Paz. It exploded across my hotel room.
The body makes a wide range of changes in order to cope better with the lack of oxygen at high altitude. This process is called acclimatisation. If you don’t acclimatise properly, you greatly increase your chance of developing altitude sickness, or even worse, HAPE (high altitude pulmonary oedema) or HACE (high altitude cerebral oedema).