What would happen if you flew up to 40 thousand feet?At this altitude you will pass out and surely die for lack of oxygen. That's why AIRLINERS have a pressurized cabin. This means atmospheric pressure is exactly like what we all breathe on the ground. Pressurized air comes from compressors driven by the engines. The compressor sucks in low pressure air from outside, compresses it to make it into high pressure air and sends it to a heater. Here it is warmed to a comfortable temperature before being passed on to the cabin through vents. Stale air leaves the plane thru valves. That's why we all breathe easy when flying at altitudes from 10 thousand up to 40 thousand feet above sea level. Any altitude below 10 thousand feet is normal breathing for passengers and does not require pressurization. So, on your next long flight you know what keeps you alive and comfortable.
Have a nice day!