Pneumonia is caused when bacteria, viruses, or fungi infect the lungs and trigger inflammation that fills the tiny air sacs (alveoli) with fluid and pus. This fluid buildup prevents oxygen from passing efficiently into the bloodstream, which is why pneumonia makes breathing difficult and can become life-threatening. In 2021, 2.1 million people died from pneumonia worldwide, making it deadlier than any other infectious disease.
What Happens Inside Your Lungs
Your airways have built-in defenses. Mucus traps inhaled germs, tiny hair-like structures sweep them upward, and immune cells patrol the surfaces. Pneumonia develops when a pathogen overwhelms these defenses and reaches the alveoli, the grape-like clusters deep in your lungs where oxygen and carbon dioxide are exchanged with your blood.
Once a pathogen attaches to the cells lining the alveoli, your immune system launches an aggressive response. White blood cells called neutrophils flood into the area, releasing chemicals designed to kill the invader. But this inflammatory response also damages the thin walls of the alveoli and the surrounding blood vessels. As those walls become more permeable, fluid leaks into the air sacs. The lungs also lose surfactant, a slippery substance that keeps the alveoli open and flexible. Without enough surfactant, the air sacs can partially collapse, making it even harder to breathe.
The combination of fluid-filled air sacs, damaged tissue, and impaired surfactant is what produces the hallmark symptoms: cough, difficulty breathing, chest pain, and sometimes dangerously low oxygen levels.
Bacterial Pneumonia
Bacteria are the most common cause of pneumonia in adults. The leading culprit, Streptococcus pneumoniae (pneumococcus), normally lives harmlessly in the nose and throat. Most of the time your immune system keeps it in check. Problems start when the bacteria migrate down into the lower respiratory tract, evade mucus defenses, and latch onto the alveolar lining. Pneumococcus is remarkably good at this. It produces enzymes that neutralize key immune defenses, including one that breaks apart a protective antibody found on mucosal surfaces.
Other bacteria cause pneumonia too, and which ones depend partly on age. Newborns are vulnerable to bacteria picked up during birth, including group B streptococcus and E. coli. In children ages 5 to 13, a bacterium called Mycoplasma pneumoniae becomes increasingly common. In adults, Staphylococcus aureus and various gut-associated bacteria are frequent causes, especially in hospital settings.
Viral Pneumonia
Viruses account for most pneumonia cases in young children. Respiratory syncytial virus (RSV) is the leading viral cause in infants and small children, while influenza A causes the most viral pneumonia deaths across all ages. Coronaviruses, including SARS-CoV-2, can also cause severe pneumonia, particularly in people with weakened immune systems or underlying health conditions.
Viral pneumonia carries an additional risk: it can pave the way for a secondary bacterial infection. The virus damages the airway lining and suppresses local immune defenses, creating an opening for bacteria to invade. This pattern was responsible for the majority of deaths during the 1918 influenza pandemic, where most victims died not from the flu virus itself but from bacterial pneumonia that followed. Doctors today remain alert to this possibility, since a patient who seems to be recovering from a viral illness and then worsens may have developed a bacterial co-infection.
Fungal Pneumonia
Fungal pneumonia is far less common than bacterial or viral types, but it poses a serious threat to people with compromised immune systems. The fungus Pneumocystis jirovecii is the most common AIDS-defining illness in people whose immune cell counts drop below a critical threshold, and it also affects people taking long-term immune-suppressing medications such as high-dose steroids or transplant drugs.
Other fungi that cause pneumonia are found in specific environments. Some thrive in soil contaminated with bat droppings. Aspergillus species are everywhere in the air and are continuously inhaled by everyone, but they only cause disease when the immune system can’t clear them. Geographic location matters: certain fungal infections cluster in river valleys, deserts, or tropical regions where the organisms are naturally concentrated in the soil.
Aspiration Pneumonia
Not all pneumonia starts with breathing in germs from another person. Aspiration pneumonia happens when food, liquid, saliva, or stomach acid is inhaled into the lungs. Normally, your body prevents this with reflexes: the flap over your windpipe (the glottis) closes during swallowing, and if something slips through, a cough reflex kicks in. When those reflexes are impaired, bacteria-laden material can reach the alveoli and trigger infection.
This type of pneumonia is most common in older adults, especially those who are bedridden or frail. People with neurological conditions like Parkinson’s disease, dementia, multiple sclerosis, or stroke-related swallowing difficulties face elevated risk. So do people with gastroesophageal reflux disease, esophageal disorders, or those who are heavily sedated from medications, alcohol, or drug overdose. Anyone with a nasogastric tube or tracheostomy is also more vulnerable because these devices can bypass normal protective reflexes.
How Pneumonia Spreads
The germs that cause pneumonia spread in different ways depending on the pathogen. Bacterial and viral pneumonia typically spread through respiratory droplets produced when an infected person coughs, sneezes, or talks. Smaller droplets (under 100 micrometers) can hang suspended in the air, while larger ones settle onto surfaces. Touching a contaminated surface and then touching your eyes or mouth is another route, though direct respiratory exposure is more common.
Aspiration and fungal pneumonia, by contrast, are not contagious in the traditional sense. Aspiration pneumonia results from your own oral or stomach contents entering your lungs. Fungal pneumonia comes from environmental exposure, not person-to-person transmission.
Hospital-Acquired vs. Community-Acquired
Where you catch pneumonia significantly affects which germs are involved and how difficult it is to treat. Community-acquired pneumonia, the kind you develop in everyday life, is most often caused by pneumococcus. These infections generally respond well to standard treatment.
Hospital-acquired pneumonia develops 48 hours or more after admission and involves a different cast of pathogens, including Staphylococcus, Pseudomonas, and various intestinal bacteria. Many of these organisms are resistant to multiple antibiotics, which makes hospital-acquired pneumonia harder to treat and often more severe. Patients on mechanical ventilators are at particular risk because the breathing tube provides a direct path for bacteria to enter the lungs.
Who Is Most Vulnerable
Age sits at both extremes of the risk spectrum. More than 500,000 children under 5 die from pneumonia each year, and over 1 million adults older than 70. Young children have immature immune systems that haven’t yet encountered many common pathogens, while older adults often have weakened immunity and accumulated health conditions.
Chronic diseases increase susceptibility significantly. The CDC lists chronic heart disease, chronic liver disease, chronic lung disease (including COPD and asthma), and diabetes as conditions that raise pneumonia risk. People with weakened immune systems face the greatest danger, whether from HIV, cancer treatment, organ transplant medications, or long-term steroid use.
Lifestyle factors play a role too. Smoking damages the airway’s mucus-clearing system and impairs immune cells in the lungs. Alcohol misuse increases the chance of aspiration and suppresses immune function. Even seemingly minor factors like recent antibiotic use or a recent hospital stay can shift the balance, because antibiotics can disrupt protective bacteria in the airways and hospitals expose you to more aggressive pathogens.
Mild, Moderate, and Severe Cases
Pneumonia ranges enormously in severity. A mild case in an otherwise healthy person under 65 may involve a persistent cough, low fever, and fatigue that resolves with rest and outpatient treatment. You’re more likely to have mild pneumonia if your blood pressure and breathing rate are normal, you’re thinking clearly, and you don’t have other serious health conditions.
Moderate pneumonia shows up with warning signs like confusion, drowsiness, low blood pressure, or worsening shortness of breath. Old age and underlying diseases push cases into this category. Severe pneumonia threatens vital organs: the kidneys, heart, and circulatory system can begin to fail when the lungs can no longer deliver enough oxygen. At this stage, the damage to the alveolar walls may become so extensive that fluid accumulation overwhelms the lungs’ ability to clear it, a condition that can progress to acute respiratory distress syndrome.