Infections are the main cause of pneumonia, with bacteria, viruses, and fungi all capable of triggering the disease. Among bacteria, Streptococcus pneumoniae (often called pneumococcus) is the single most important culprit, responsible for 10% to 30% of community-acquired pneumonia in adults and the leading pathogen identified in pneumonia-related deaths worldwide. But the full picture is more nuanced: the specific cause depends heavily on your age, where you got sick, and how well your immune system is functioning.
How Pneumonia Develops in the Lungs
Your lungs have built-in defenses. The lining of your airways produces antimicrobial substances, and specialized immune cells called macrophages patrol the tiny air sacs (alveoli) where oxygen enters your blood. Most of the time, these defenses neutralize inhaled germs before they can take hold.
Pneumonia starts when a pathogen overwhelms those defenses. Once the immune system detects an invader it can’t handle quietly, it launches a full inflammatory response: signaling molecules flood the area, blood vessels become leaky, and white blood cells rush into the lung tissue. This inflammation causes the air sacs to fill with fluid and immune debris, which is what makes breathing difficult and produces that heavy, wet cough. The infection can stay in one section of the lung or spread across both sides, depending on the pathogen and how quickly your body responds.
Bacterial Pneumonia
Pneumococcus is the classic bacterial cause. It accounts for a large share of cases picked up in everyday life (not in a hospital), and a 2024 report in the American Journal of Respiratory and Critical Care Medicine identified it as the most frequent pathogen in pneumonia contributing to antibiotic-resistant deaths, responsible for 16% of those fatalities globally. Pneumococcal pneumonia tends to come on suddenly with high fever, shaking chills, chest pain when breathing, and a cough that produces rust-colored or greenish mucus.
Another common bacterial cause, Mycoplasma pneumoniae, behaves quite differently. It’s the most common bacterial cause of pneumonia requiring hospitalization in children, and the second most common in adults. People with Mycoplasma infections often look surprisingly well for someone with a lung infection. Symptoms are milder: a persistent dry cough, fatigue, low-grade fever, and mild shortness of breath. Because people usually keep going about their day, this form earned the nickname “walking pneumonia.” That said, it’s not always harmless. In some cases it can trigger asthma attacks, kidney problems, serious skin reactions, or even brain inflammation.
Viral Pneumonia
Viruses are actually the most common cause of pneumonia in young children. In babies and toddlers under age 2, viruses account for the majority of cases. In children aged 2 to 5, respiratory viruses still dominate, though bacterial infections like pneumococcus start to appear more frequently.
The major viral players are influenza, respiratory syncytial virus (RSV), and SARS-CoV-2 (the virus behind COVID-19). These three viruses drive a predictable wave of pneumonia hospitalizations every fall and winter. RSV hits infants and young children hardest, while influenza and COVID-19 pose the greatest pneumonia risk for older adults and people with chronic conditions. Rhinoviruses, the usual cause of the common cold, can also cause pneumonia in vulnerable people, though this is less common. Viral pneumonia often starts with typical cold or flu symptoms before progressing to more significant breathing difficulty over several days.
Fungal Pneumonia
Fungal pneumonia is uncommon in healthy people, but it can be life-threatening for anyone with a weakened immune system. The most important example is Pneumocystis jirovecii, a fungus that causes a type of pneumonia historically considered a hallmark of AIDS. Today, the highest-risk groups include people with blood cancers, organ transplant recipients, and anyone on medications that suppress the immune system, particularly corticosteroids combined with other immunosuppressive drugs. One study found that 91% of patients with a first episode of this fungal pneumonia had used corticosteroids within the previous month.
Aspiration Pneumonia
Not all pneumonia starts with catching a germ from someone else. Aspiration pneumonia happens when food, liquid, saliva, or stomach acid enters the airways instead of the esophagus. This can introduce bacteria from the mouth or stomach directly into the lungs, or the acidic stomach contents themselves can cause a chemical burn to the lung tissue, triggering intense inflammation even without an infection. This chemical form is sometimes called aspiration pneumonitis.
Aspiration pneumonia is particularly common in older adults with swallowing difficulties, people with neurological conditions, anyone who is heavily sedated, and those with chronic acid reflux. The reflux connection is worth noting: repeated small episodes of stomach contents reaching the airways (microaspiration) can cause ongoing lung damage over time, even contributing to conditions like pulmonary fibrosis.
Hospital-Acquired Pneumonia
Pneumonia picked up in a hospital involves a different set of bacteria than the kind you catch in the community. The dominant organisms are Pseudomonas aeruginosa, Staphylococcus aureus (including MRSA), and various Enterobacter species. Gram-negative bacteria account for 55% to 85% of hospital-acquired cases, while gram-positive bacteria like Staph aureus cause 20% to 30%. Many cases involve multiple organisms at once. Patients on mechanical ventilators face the highest risk, and the bacteria involved tend to be more resistant to antibiotics, making these infections harder to treat.
Who Is Most Vulnerable
Certain chronic conditions significantly raise your risk regardless of the specific germ involved. The CDC identifies chronic heart disease, chronic lung disease (like COPD or asthma), chronic liver disease, and diabetes as major risk factors. Behavioral factors matter too: smoking damages the lung’s natural defenses, excessive alcohol use impairs immune function, and spending time around sick people increases your exposure to respiratory pathogens.
Age sits at both ends of the risk spectrum. Children under 5 have immune systems that are still maturing, making them more susceptible to viral pneumonia in particular. Adults over 65 face rising risk from both bacterial and viral causes as immune function naturally declines. These two age groups consistently account for the highest rates of pneumonia hospitalization and death.
How Vaccines Have Changed the Picture
Pneumococcal vaccines have dramatically reduced one of pneumonia’s leading causes. After widespread childhood vaccination programs were introduced, invasive disease from the original vaccine-targeted strains dropped sharply. Among people aged 60 and older, cases caused by the strains covered by early vaccines fell from about 19 per 100,000 to 5.5 per 100,000.
The challenge is that pneumococcus comes in many strains, and as vaccines eliminated the most common ones, previously rare strains became more prevalent. This has driven the development of newer vaccines covering 15 and 20 strains, with a 21-strain version in development that targets eight strains not covered by any earlier formulation. Annual flu vaccination and COVID-19 vaccination also reduce viral pneumonia risk, particularly for older adults and people with chronic health conditions.

