How does oxygen change with altitude?
Oxygen doesn't change, but the partial pressure of oxygen changes with altitude.
The weight of the air above us causes the atmospheric pressure, which is roughly 760 mmHg at sea level.
Atmospheric pressure falls to about 380 mmHg at 5500 m and only 230 mmHg at 8900 m.
The proportion of oxygen is 21 % at all altitudes, so its partial pressure also decreases at higher altitudes.
The decreased oxygen pressure reduces the driving force for gas exchange in the lungs.
The body makes a wide range of changes (acclimatization) to cope with the lack of oxygen at high altitude.
If you don’t acclimatize properly, you greatly increase your chance of developing altitude sickness.