For starters, it depends on the definition of the word "safe". Humans are famously bad judges of risk as I observe on a nearly daily basis. Statistically, perhaps only elevators are a less risky form of transportation than commercial aviation. And yet watching ostensibly normally functioning people come close to losing their minds as they board an airplane gives one pause when giving odds on the likelihood of the continued existence of the species. But never mind.
Let's start with the basics of how airplane pressurization and air conditioning work. Then we'll talk about the resulting air quality in the cabin and the risk of disease transmission which has been on everyone's mind.
It's Just Like a Balloon
Think of the aircraft as a balloon with two holes in it. Air is being blown into one hole to try to inflate the balloon but simultaneously leaking out of the other. If the amount of air entering equals the amount leaving, the balloon grows neither larger nor smaller. In a nutshell, that is how aircraft pressurization works.
The air we breathe on this planet is made up of many gases with the primary ones being nitrogen (78%), oxygen (21%) and argon (1%) along with many other gases making up the remaining bits. It is the partial pressure of oxygen which keeps you alive. As you climb higher into the atmosphere, that pressure drops. Most healthy humans can function normally up to an altitude of about 10,000 feet and above 14,000 feet cognitive function is impaired in most people.
Of course conditioned and trained people can go much higher with climbs up Everest at 35,000 feet being accomplished without oxygen. But for most people, going above 10,000 feet results in discomfort and light hypoxia. For this reason, aircraft cabins are always pressurized to an altitude below 10,000 feet.
Why not keep airplanes pressurized to sea level pressure? It's an engineering tradeoff. Most commercial aircraft are built to withstand a pressure differential of about 8 psi meaning the maximum difference between the air inside the plane and that outside is about 8 psi. This translates to a cabin altitude of about 8500 feet when the airplane is at it's maximum altitude of 40,000 feet. It could be built to withstand higher pressure (and some business jets are) but the cost and weight goes up greatly with thicker skin.
Now back to our balloon analogy. The air coming into the cabin is bled from the engines. Air enters the engine and travels through a series of compressor stages where most of it is used in combustion with the fuel. However some high pressure and temperature air is bled off and fed to a unit known as the air cycle machine. Using a linear flow model as opposed to a Carnot cycle used in your car's air conditioner, the air is then cooled and expanded before being fed into the cabin. Hot air from earlier stages in the process is mixed with cold air from the air cycle machine to attain a desired temperature.
On the back side of the plane is the second hole known as the outflow valve. This is where the pressure in the plane is controlled as there is a door which modulates open and closed to let air out at a rate to control the pressure inside the plane. For a given inflow rate, when the outflow valve closes, the pressure in the plane goes higher. A pressure relief valve keeps the "balloon" from bursting from over pressure in the case of a malfunction.
The inflow rate is modulated by automatic valves and is kept mostly constant while the outflow valve is controlled by a digital pressure controller. This provides for a gradual pressure climb and descent to match the pressure altitude of the landing airport which is set by the pilot. Were this not the case, the doors, which are essentially plugs, could not be opened at the destination if the aircraft was still pressurized. It's also why these doors can't be opened in flight. The air pressure keeps them closed with many hundreds of pounds of force.
Why Do My Sinuses Bother Me on an Airplane?
Well for one thing, the air in the stratosphere has almost zero moisture contained within it and as a result, the air coming into the cabin at altitude is also nearly zero percent humidity. This is why you will become quickly dehydrated on a long flight. Some business aircraft actually have humidifiers installed for comfort but these are not installed on commercial aircraft to my knowledge due to weight, cost, and corrosion considerations. Dry mucous membranes can also cause discomfort over long periods.
Pressure changes experienced on an aircraft are well known to cause discomfort. The reason for this is the construction of the human head. Aerospace travel was apparently not considered in its design. Put simply, air does not always flow freely into and out of the sinus cavities and ears of the mark-one mod-zero human. When the air pressure is changing outside of said human and congestion or some other problem prevents the air pressure from equalizing, pain often results.
This pain and discomfort most often manifests itself during descent as the pressure is increasing. During climb, air escapes more easily from sinuses but a "flapper" like effect makes increasing pressure more difficult to equalize resulting in sinus and ear blocks. They can be excruciatingly painful. Not flying with a cold is always a good idea but using a nasal inhalant such as Afrin can help greatly in the event of discomfort. It should not be used prophylactically though as there is a "bounce-back" effect and it can become habit-forming if used continuously.
Are the Pilots Turning Down the Oxygen?
Why yes. Yes they are up there wearing oxygen masks while turning the oxygen valve to make passengers fall asleep and to also save money on oxygen tanks. And cackling wildly as they watch you turn slowly blue. Sometimes, though they need to take a break from that duty to monitor the chem-trail dispersal systems.
Seriously, though, per the laws of physics, the oxygen content of cabin air will decrease with cabin altitude. For customers who have hit it especially hard the night before or have health considerations, the resulting lack of oxygen may result in an extended nap or shortness of breath. My airline does not allow bottled oxygen to be brought on board by customers, but does allow battery powered oxygen concentrators. Checking ahead of time what the policies are is always helpful.
And no, there are no oxygen tanks in use during a normal flight. Your ability to remain conscious at altitude is a function of the cabin pressure. As long as it remains below about 10,000 feet, you'll stay awake and alive. There are oxygen tanks aboard but they are for crew use during emergencies.
There aren't even any oxygen tanks hooked to the emergency oxygen masks that will drop if the cabin pressure rises above 14,000 feet. Those are actually connected to "oxygen generators" which is a fancy way of saying a chemical stew that "burns" when activated but gives off oxygen as a byproduct. A number of these oxygen generators which were improperly packed caught fire in the cargo hold and brought down a Valuejet MD-80 about 15 years ago. As installed in the aircraft overhead passenger service unit, the heat generated during use is harmless.
Should the "rubber jungle" ever fall down in your face, you will have about 12 minutes of oxygen mixed with ambient air to keep you awake while hopefully your pilot gets the airplane pressurization under control or gets below 10,000 feet. But remember that since the mask mixes oxygen with ambient air, it won't keep you from breathing smoke should a fire ever break out.
Another favorite conspiracy theory is that pilots recirculate used air to be breathed again and again...to save money. Well, this one is true. A certain amount of the air on most commercial aircraft is in fact recycled. A "recirc" fan recirculates a certain amount of air through a filter like the HVAC system in your house, car, and office. This results in higher humidity and less fuel consumption. And while 100% of the air from your home air conditioning system is recycled, the number is closer to 50% on an aircraft depending on the model.
But How Safe is it Really?
Again, it depends, but air quality on a modern commercial aircraft is probably about as safe as it can reasonably be. According to Boeing, passengers receive between 14 and 20 cubic feet of air per person per minute and this air is essentially particle free. Boeing claims that the HEPA filters used can remove particles as small as .3 microns which includes most microorganisms.
So while the air coming from the airplane is probably safe, it's that guy sitting next to you hacking up a lung you're probably worried about. And probably with good cause. It's not the airplane itself that is the problem, it's the proximity to sick people in the cabin with you.
Put several hundred people in any enclosed space be it airplane, elevator, or subway, and someone with an infectious airborne disease will probably transmit something to someone. But of all those transportation methods, the airplane probably has the freshest air source. Directing one of the overhead gasper air vents towards your face may have some effect in keeping ambient air particles out of your lungs but how much is unknown. And as I mentioned earlier, the air is probably fresher than your home or office.
While the practice is more often seen in Asian countries than the US, wearing a mask can certainly cut down the risk of acquiring an airborne infection. But other than wearing a mask, there's probably little that you can do to reduce your risk of airborne infection other than staying off the plane altogether.
Is There Anything Else I Should Worry About?
The other and probably equally dangerous threat on an aircraft is the tray table. And also the armrest, and the lavatory. And probably your seat too.
All these things are public spaces and most likely contaminated with germs, fecal matter, and other gross stuff. Just consider the interior of the airplane as one giant Petri dish. It probably isn't a bad idea to carry a supply of anti-bacterial wipes and to wipe down your immediate area when you sit down. Use the anti-bacterial soap in the washroom and learn to unlock and open the door with your elbows.
I personally don't eat or drink on an aircraft either. The flight attendants are handling cash, credit cards, trash and empty cups all day from hundreds of people. Sure they wash their hands and wear gloves at times but is that diet Coke worth a few weeks of flu, or worse? And keep your hands away from your face.
Yes, but aren't the airplanes cleaned every night? Sure they are. We park and a crack crew of uniformed professionals are waiting to scrub down every bit of the aircraft to CDC approved standards using industry standard anti-microbial cleaning agents. Not.
No, the "cleaning crew" consists of minimum wage immigrant labor armed with a vacuum cleaner and a few rags. The plane is also tidied up between flights but not "cleaned".
So What Now?
Well I guess in the words of Dirty Harry, "Do ya feel lucky?" If you've got to go fly, then go fly. I'll be there because I have to be.
Your odds of catching Ebola or Enterovirus are probably infinitesimal but increasing, due to the madness of our open borders policies inviting the third world and their diseases to our shores.
You are probably more likely to get something more common like the flu on an airplane but a few common sense steps as mentioned above should help. And voting. That will help as well.