Pneumonia starts when germs reach your lungs and your body cannot clear them fast enough

Pneumonia happens when bacteria, viruses, or fungi get into the air sacs of your lungs—the tiny pouches where oxygen normally enters your bloodstream. Your lungs try to fight the infection by filling those air sacs with fluid or pus. That fluid blocks oxygen from reaching your blood, which is why you feel short of breath and tired. The infection itself causes inflammation, coughing, and fever as your immune system works to fight back.

You do not catch pneumonia the way you catch a cold. Instead, germs you breathe in—or sometimes germs already in your mouth that slip into your lungs—settle and multiply. Most people breathe in bacteria and viruses every day without getting sick because their lungs have defenses: tiny hairs called cilia that sweep germs out, mucus that traps them, and white blood cells that kill them. Pneumonia happens when those defenses fail or when the germ load is too heavy to handle.

Key Takeaways

  • Pneumonia develops when germs reach your lungs and multiply faster than your body can clear them, filling air sacs with fluid that blocks oxygen.
  • Bacteria, viruses, and fungi can all cause pneumonia, and the path they take into your lungs varies—some you breathe in, others travel from your mouth or bloodstream.
  • Your lungs have natural defenses like cilia and mucus, but these fail when you are already sick, very young or old, or have a weakened immune system.
  • Pneumonia usually follows another illness like the flu or a cold, because that infection has already damaged your lungs' ability to fight back.

How germs enter your lungs in the first place

Most pneumonia starts with breathing. When someone with pneumonia coughs or sneezes, they release droplets carrying bacteria or viruses into the air. You breathe those droplets in, and they travel down your windpipe into your lungs. This is how community-acquired pneumonia spreads—the kind you catch from people around you, not from a hospital.

Germs can also come from your own mouth. Your mouth and throat naturally contain bacteria. When you swallow, those bacteria usually go down your esophagus to your stomach, where stomach acid kills most of them. But if you aspirate—meaning food, saliva, or stomach contents accidentally go into your lungs instead of your esophagus—those bacteria can settle in your lungs and cause infection. This happens more often if you have trouble swallowing, are sedated, or have acid reflux.

Less commonly, germs enter through your bloodstream. If you have a blood infection or an infection elsewhere in your body, bacteria can travel through your veins and lodge in your lungs. This is rarer but more serious because the infection is already in your system.

Why your lungs cannot fight off the infection

Your lungs are not defenseless. Cilia—microscopic hairs lining your airways—constantly wave back and forth to push mucus and trapped germs up and out. Mucus itself is sticky and traps particles before they go deep into your lungs. Your immune system sends white blood cells to patrol and kill invaders. When everything works, you never know germs entered at all.

Pneumonia happens when these defenses break down. If you already have the flu or a cold, that virus has inflamed your airways and damaged some of your cilia. Your mucus production changes. Your immune system is already busy fighting the first infection, so it cannot respond as fast to new germs. This is why pneumonia so often follows another respiratory illness—your lungs are already weakened.

Age matters too. Very young children and adults over 65 have weaker immune responses. People with chronic lung disease like COPD or asthma have airways that are already inflamed and harder to clear. Smokers have damaged cilia that do not work well. Anyone with a weakened immune system—from HIV, cancer treatment, or immunosuppressant medications—cannot fight infection as effectively. These groups are at higher risk not because they are exposed to different germs, but because their lungs cannot clear the germs they do encounter.

What happens once germs multiply in your lungs

Once bacteria or viruses establish themselves in your lungs, they multiply rapidly. Your immune system responds by sending inflammatory chemicals to the area to kill the germs. This inflammation causes the air sacs to fill with fluid or pus—a process called consolidation. On a chest X-ray, this shows up as a white or cloudy area instead of the normal dark appearance of air-filled lung tissue.

That fluid is the problem. Your lungs need air in those sacs to transfer oxygen into your blood. When they are filled with fluid instead, oxygen cannot cross. Your blood oxygen level drops, which is why you feel breathless and exhausted. Your body tries to compensate by breathing faster and harder, which is why pneumonia causes rapid or labored breathing.

At the same time, your body is mounting a systemic response. Fever develops as your immune system raises your body temperature to slow bacterial growth. You feel chilled and achy. You cough as your lungs try to clear the fluid and mucus. The combination of infection, inflammation, and fluid buildup is what makes pneumonia feel so severe.

Different types of pneumonia develop different ways

Bacterial pneumonia usually comes on suddenly. You feel fine, then within hours or a day you have high fever, sharp chest pain when you breathe, and a cough that produces rust-colored or greenish sputum. Streptococcus pneumoniae is the most common bacterial cause. Bacterial pneumonia typically follows a cold or flu that has already damaged your lungs.

Viral pneumonia develops more gradually. You have a cough, low-grade fever, and body aches that worsen over several days. Influenza virus and respiratory syncytial virus (RSV) are common causes. Viral pneumonia often stays milder than bacterial, but it can still be serious, especially in older adults or people with heart disease.

Fungal pneumonia is less common and usually only happens in people with very weak immune systems. It develops slowly over weeks. Aspergillus and Pneumocystis are examples. Fungal pneumonia requires different treatment than bacterial or viral, which is why knowing the cause matters.

Risk factors that make pneumonia more likely

Certain conditions make your lungs more vulnerable. Chronic diseases like diabetes, heart disease, and kidney disease weaken your immune response. Smoking damages your cilia and makes your airways more inflamed. Alcohol use disorder impairs immune function and increases aspiration risk. Recent surgery or hospitalization exposes you to hospital germs and puts stress on your body.

Medications that suppress your immune system—used for autoimmune disease, cancer, or after organ transplant—lower your ability to fight infection. Conditions like cerebral palsy or Parkinson's disease that affect swallowing increase aspiration risk. Even stress and poor sleep can temporarily weaken your immune system enough to tip the balance when you are exposed to pneumonia-causing germs.

The more risk factors you have, the more likely pneumonia is to develop if you are exposed to the right germs. This is why doctors pay special attention to older adults with multiple chronic conditions—their lungs are fighting an uphill battle.

How pneumonia progresses if untreated

In the first few days, your body is fighting hard. Fever, cough, and shortness of breath get worse. If your immune system is strong enough, it may win—the infection clears, fluid reabsorbs, and you recover. This happens in some people with mild pneumonia who do not seek treatment.

If the infection is not cleared, it spreads. Germs multiply faster than your immune system can kill them. More air sacs fill with fluid. Your blood oxygen drops further. You become confused or drowsy because your brain is not getting enough oxygen. Your lips or fingernails may turn blue. This is when pneumonia becomes life-threatening.

Untreated pneumonia can lead to sepsis, where the infection enters your bloodstream and affects your whole body. It can cause acute respiratory distress syndrome (ARDS), where your lungs fail to transfer oxygen at all. It can cause a lung abscess, where pus collects in a pocket in your lung tissue. These complications are why pneumonia is taken seriously and why treatment—whether antibiotics for bacterial pneumonia or supportive care for viral—matters.

Frequently Asked Questions

Can you get pneumonia from being cold or wet?

No. Cold weather and wet clothes do not cause pneumonia. What matters is whether you are exposed to pneumonia-causing germs and whether your lungs can fight them off. Cold weather may increase your risk indirectly because people spend more time indoors in close contact, spreading respiratory viruses that can lead to pneumonia.

Is pneumonia contagious?

The germs that cause pneumonia are contagious, but pneumonia itself is not. You can catch the cold or flu virus from someone with pneumonia, but whether you develop pneumonia depends on your lungs' defenses. Most people who catch the virus will not develop pneumonia.

Why do some people get pneumonia and others do not after the same illness?

It depends on your immune system strength, age, lung health, and whether you have chronic diseases. Two people exposed to the same virus may have very different outcomes. Someone with COPD or a weakened immune system is far more likely to develop pneumonia than a healthy young person with the same exposure.

Can you get pneumonia twice?

Yes. Recovering from pneumonia does not make you immune. You can catch pneumonia again from a different germ, or even from the same type if your lungs are damaged or your immune system is weak. People with chronic lung disease are at risk for repeated pneumonia.

Does pneumonia always show up on a chest X-ray?

Usually, but not always. Early pneumonia may not show up yet. Walking pneumonia—a mild viral or atypical bacterial infection—may cause minimal changes on X-ray even though you are sick. This is why doctors consider your symptoms and exam findings, not just the X-ray.