The formation of the atmosphere was unknown until Pascal proved its existence in 1648. He proved that air pressure decreases as we go higher above sea level.
Later on it was discovered that air in the lower layers of the atmosphere is denser. About 50 % of the air mass is located between the surface of the earth and 20,000 feet above sea level, and 90% is located between the surface of the earth and 50,000 feet above sea level.
Therefore, density decreases vertically until air reaches its utmost rarefaction (minimum pressure) in the higher layers of the atmosphere before it completely vanishes in outer space
When a human being goes higher than ten thousand (10,000) feet above sea level, it does not cause him any serious problem, as the respiratory system can handle the height of 10,000 to 25,000 feet above sea level; however, if a person goes into outer space, the amount of pressure and oxygen decrease causing the closing of the chest and dyspnea (shortness of breath). Then, the breathing process becomes difficult because of the lack of oxygen (oxygen starvation) and the respiratory system completely fails, causing death.