Pneumonia is an infection that fills your lung's air sacs with fluid or pus
Pneumonia happens when germs—bacteria, viruses, or fungi—get into your lungs and cause an infection. Your lungs have tiny air sacs called alveoli where oxygen normally moves into your blood. When you have pneumonia, these air sacs fill with fluid or pus instead of air. That means less oxygen reaches your bloodstream, which is why pneumonia can make you feel short of breath and tired.
The infection can start in different ways. You might breathe in germs from someone who is coughing or sneezing. You might inhale germs from your own mouth or nose if your immune system is weakened. Or germs already in your body can spread to your lungs. Once the infection takes hold, your body's immune system fights back, which causes inflammation—swelling and irritation in the lung tissue.
Key Takeaways
- Pneumonia fills your lung's air sacs with fluid or pus, preventing oxygen from reaching your blood properly.
- Bacteria, viruses, and fungi can all cause pneumonia, and the type of germ determines how serious it is and how it is treated.
- Your age, overall health, and whether your immune system is weakened affect how severe pneumonia becomes.
- Symptoms like cough, fever, and chest pain usually appear within days of infection, though some people develop symptoms slowly.
- Pneumonia ranges from mild (sometimes called "walking pneumonia") to severe enough to require hospitalization.
How different germs cause pneumonia
Bacterial pneumonia is the most common type in adults. Streptococcus pneumoniae is the bacterium doctors see most often. Bacterial pneumonia usually comes on suddenly—you feel fine one day and very sick the next. You develop a high fever, cough up mucus that may be greenish or rust-colored, and feel chest pain when you breathe or cough.
Viral pneumonia often starts as a cold or flu that moves into your lungs. Influenza virus and respiratory syncytial virus (RSV) are common causes. Viral pneumonia usually develops more slowly than bacterial pneumonia. Your cough may be dry at first, and you might not run as high a fever. Viral pneumonia can be serious, but it is often less severe than bacterial pneumonia in otherwise healthy adults.
Fungal pneumonia is less common and usually only serious if your immune system is very weak—from HIV, chemotherapy, or certain medications. Fungal infections develop slowly and can be harder to diagnose because the symptoms look like other lung problems.
Why some people get sicker than others
Your age and overall health determine how hard pneumonia hits. Infants under age 2, adults over 65, and people with chronic conditions like heart disease or diabetes are at higher risk for severe pneumonia. If your immune system is weakened—from HIV, cancer treatment, or certain medications—pneumonia is more likely to become dangerous.
Smoking damages your lungs' ability to clear germs, so smokers get pneumonia more often and recover more slowly. Alcohol use disorder also weakens your immune response. If you have asthma or chronic obstructive pulmonary disease (COPD), pneumonia is more likely to cause serious breathing problems. Even being bedridden or having trouble swallowing puts you at risk, because germs can more easily reach your lungs.
What symptoms to watch for
The main symptom is a cough that lasts more than a few days. You might cough up mucus, or the cough might be dry. Fever is common—usually above 100.4°F (38°C)—though some people with pneumonia run only a low fever or no fever at all. You may feel chilled, sweat heavily, or feel exhausted even if you are resting.
Chest pain that gets worse when you breathe deeply or cough is a sign the infection has reached the lining around your lungs. Shortness of breath, even with light activity, means your lungs are not moving oxygen into your blood efficiently. Some people feel confused or disoriented, especially older adults, which can be a sign the infection is serious.
In children, watch for rapid or difficult breathing, retractions (skin pulling in around the ribs when breathing), and refusal to eat or drink. Newborns and very young infants may not show obvious symptoms but might be unusually sleepy or irritable.
The difference between walking pneumonia and severe pneumonia
Walking pneumonia (usually caused by a bacterium called Mycoplasma pneumoniae) is mild enough that you can stay on your feet and go about your day. You have a persistent dry cough, low fever, and fatigue, but you are not short of breath and your oxygen level stays normal. Walking pneumonia still needs treatment, but you can usually recover at home.
Severe pneumonia means your lungs cannot get enough oxygen into your blood. You feel short of breath at rest, your lips or fingertips may turn bluish, and you might feel confused. Your heart rate speeds up as your body tries to compensate. Severe pneumonia often requires hospitalization so doctors can give you oxygen and monitor your condition closely.
How pneumonia is diagnosed
A doctor listens to your lungs with a stethoscope and hears crackling or wheezing sounds that suggest fluid in your lungs. A chest X-ray shows where the infection is and how much of your lung is affected. Blood tests can sometimes identify which germ is causing the infection, though results take days.
If you are hospitalized or very sick, doctors may take a sputum sample (mucus you cough up) to identify the exact bacterium or virus. This helps them choose the right treatment. In some cases, a CT scan gives a clearer picture of what is happening in your lungs, especially if pneumonia is not improving as expected.
Recovery and what happens next
Bacterial pneumonia is treated with antibiotics, which kill the bacteria causing the infection. You usually start feeling better within a few days, but the cough can linger for weeks. Viral pneumonia has no specific medicine—your body's immune system has to fight it off—though doctors may give you supportive care like oxygen and fluids.
Even after you feel better, your lungs need time to fully heal. You may feel tired for weeks. A follow-up chest X-ray a few weeks after treatment confirms that the infection has cleared. If you smoke, quitting now protects your lungs from future infections. If you are over 65 or have chronic health conditions, a pneumonia vaccine can lower your risk of getting pneumonia again.
Frequently Asked Questions
Can pneumonia turn into something worse?
Yes. Untreated bacterial pneumonia can spread to your bloodstream (sepsis), which is life-threatening. Pneumonia can also cause a buildup of fluid around your lungs (pleural effusion) or an abscess (pocket of pus) in lung tissue. These complications are why it is important to see a doctor if symptoms do not improve within a week.
Is pneumonia contagious?
Yes, but only the infection that causes it. If you have bacterial pneumonia from Streptococcus pneumoniae, you can spread that bacterium to others through coughing and sneezing. However, not everyone who gets exposed will develop pneumonia—it depends on their immune system. Viral pneumonia spreads the same way as the cold or flu that caused it.
Can you get pneumonia twice?
Yes. Having pneumonia once does not make you immune. You can get pneumonia from a different germ, or even from the same type of germ if your immune system has weakened. People with chronic lung disease or weakened immunity are at higher risk of repeated pneumonia.
What is the difference between pneumonia and bronchitis?
Bronchitis is inflammation of the tubes that carry air to your lungs (bronchi), while pneumonia is infection in the air sacs themselves. Bronchitis usually causes a cough but does not fill your lungs with fluid, so your oxygen level stays normal. Pneumonia affects oxygen exchange, which is why it is more serious.