The two main ways pneumonia starts

Pneumonia develops when germs—bacteria, viruses, or fungi—reach your lungs and cause an infection. This happens in two distinct ways. Aspiration pneumonia occurs when you inhale something you shouldn't: food, saliva, or stomach contents that slip past your airway defenses, usually while swallowing or if you're sedated. Community-acquired pneumonia is far more common and happens when you breathe in germs from the air around you—from a cough, sneeze, or contaminated surfaces.

The path from breathing in a germ to developing pneumonia is not automatic. Your lungs have multiple defenses: tiny hairs called cilia that sweep debris upward, mucus that traps particles, and immune cells that kill invaders. Pneumonia takes hold when these defenses are overwhelmed or weakened, allowing germs to multiply deep in the air sacs where oxygen exchange happens.

Key Takeaways

  • Most pneumonia comes from breathing in bacteria or viruses from someone else's cough or sneeze, not from a single exposure.
  • Your lungs have built-in defenses that usually stop germs before infection starts, so catching pneumonia depends partly on how strong those defenses are at that moment.
  • Viral infections like the flu or cold often damage lung defenses first, making bacterial pneumonia more likely to develop afterward.
  • Certain conditions—smoking, chronic lung disease, weakened immunity, or recent surgery—significantly increase the risk that an inhaled germ will cause pneumonia rather than being cleared.

Why some people get pneumonia after a cold or flu

A viral infection like influenza or a common cold damages the lining of your airways and reduces the effectiveness of your immune response in the lungs. This creates an opening for bacteria to establish a foothold. The most common culprit is Streptococcus pneumoniae, a bacterium that many people carry in their nose and throat without getting sick—until a viral infection weakens their defenses.

This is why pneumonia often appears as a secondary infection: you recover from the worst of the flu, feel slightly better for a day or two, then develop a new fever and worsening cough. The timeline matters because it tells you what's happening. If symptoms worsen while you're still fighting the original virus, bacterial pneumonia is taking hold in lungs that are already inflamed and vulnerable.

Conditions that make pneumonia more likely

Certain medical situations dramatically increase your risk. Chronic obstructive pulmonary disease (COPD) and asthma both damage the airways' ability to clear mucus and germs. Smoking does the same thing—it paralyzes the cilia that sweep your lungs clean. Diabetes, heart disease, and kidney disease weaken your immune response. Cancer patients undergoing chemotherapy, people taking immunosuppressant medications, and those with HIV all have reduced ability to fight off respiratory infections.

Age matters in both directions. Very young children (under 5) and adults over 65 have weaker immune responses to respiratory germs. Recent surgery, especially chest or abdominal surgery, increases risk because pain limits deep breathing and coughing—the mechanisms your body uses to clear the lungs. Hospitalization itself is a risk factor: ventilators and prolonged bed rest both increase the chance of pneumonia developing.

How bacteria and viruses reach the lungs

Respiratory germs travel through the air in droplets when an infected person coughs or sneezes. These droplets typically fall within 6 feet, which is why close contact with someone who has pneumonia or a respiratory infection increases your risk. You can also pick up germs by touching a contaminated surface—a doorknob, phone, or desk—and then touching your face before washing your hands.

Once inhaled, the germ lands in your upper airway first. If your defenses are working well, mucus traps it and cilia sweep it toward your throat, where you swallow it and stomach acid kills it. But if the germ is particularly virulent, or if your defenses are compromised, it travels deeper into the lungs and settles in the alveoli—the tiny air sacs where gas exchange happens. There it multiplies, triggering inflammation and filling those sacs with fluid or pus.

Why some people are asymptomatic carriers

You can harbor pneumonia-causing bacteria in your nose and throat without ever developing pneumonia. Streptococcus pneumoniae colonizes the respiratory tract in many healthy people. Your immune system keeps it in check, preventing it from traveling to the lungs and multiplying. This is why pneumonia is not simply a matter of exposure—it requires both the presence of a germ and a window of vulnerability in your defenses.

This also explains why not everyone in a household gets pneumonia when one person does. The same bacterium that causes severe pneumonia in one family member might be cleared without symptoms in another, depending on their age, overall health, vaccination status, and whether they're currently fighting another infection.

The role of aspiration in pneumonia development

Aspiration pneumonia follows a different path. Instead of breathing in germs from the air, you inhale material from your own mouth or stomach. This happens most often during sleep if you have acid reflux, or if you have difficulty swallowing due to stroke, neurological disease, or sedation. It can also occur if you're unconscious and your gag reflex doesn't work.

The danger is not always the germs themselves—your own mouth contains bacteria that are harmless when swallowed but dangerous when they reach the lungs. The real problem is that aspirated material can physically block airways or trigger a chemical burn from stomach acid. Aspiration pneumonia develops more slowly than community-acquired pneumonia and often requires different treatment because the bacteria involved are different.

What happens inside the lungs when infection takes hold

Once bacteria or viruses begin multiplying in the alveoli, your immune system responds with inflammation. White blood cells rush to the area, and fluid leaks from blood vessels into the air sacs. This fluid—which contains immune cells, dead bacteria, and cellular debris—is what shows up as the white patches on a chest X-ray. It's also what makes breathing harder: your lungs fill with fluid instead of air, reducing oxygen exchange.

The severity depends on how many alveoli are affected and how strong your immune response is. A localized infection in one section of one lung might cause mild symptoms. Infection spreading across both lungs, or in someone with weak immunity, can be life-threatening because the lungs can't deliver enough oxygen to the bloodstream.

Frequently Asked Questions

Can you get pneumonia from being cold or wet?

Cold or wet conditions don't directly cause pneumonia, but they may increase risk indirectly. Cold air can irritate airways, and being chilled might temporarily suppress immune function. The real risk comes from spending time indoors with others during cold months—more people are crowded together, and respiratory viruses spread more easily in winter.

Is pneumonia contagious?

The germs that cause pneumonia are contagious, but pneumonia itself is not. You can catch the bacteria or virus from someone with pneumonia, but whether you develop pneumonia depends on your defenses. Many people exposed to the same germ will get a mild cold or no symptoms at all, while others develop pneumonia.

How long after exposure to a germ do symptoms appear?

The incubation period varies by germ. Viral pneumonia symptoms often appear 3 to 7 days after exposure. Bacterial pneumonia can develop more suddenly, sometimes within 24 to 48 hours, especially if a viral infection has already weakened your lungs. Aspiration pneumonia may develop over days or weeks if the aspiration is small and repeated.

Can you develop pneumonia without being around sick people?

Yes. You can develop pneumonia from germs you already carry in your respiratory tract if your defenses drop—during a severe illness, after surgery, or during a period of extreme stress and poor sleep. You can also aspirate your own stomach contents without being exposed to anyone else's germs.

Why do some people get pneumonia every year?

Repeated pneumonia usually signals an underlying problem: chronic lung disease like COPD, ongoing smoking, a weakened immune system, or a structural problem in the lungs that prevents normal clearing of secretions. People with these conditions have defenses that don't recover fully between infections, making them vulnerable to the next germ they encounter.