What Is Pneumonia? Causes, Symptoms, Treatment & Is It Contagious?

What Is Pneumonia? Causes, Symptoms, Diagnosis and Treatment

Medically reviewed by Dr. Ata Ullah, MD (Medicine)

Pneumonia is one of the most common serious infections of the lungs, yet many people confuse it with an ordinary chest cold or a lingering flu. In this guide, we explain in plain language what pneumonia actually is, what causes it, how to recognize its symptoms, how doctors diagnose it, and which treatment options exist. You will also learn who is most at risk, how to lower your chances of getting it, and exactly when a cough or fever needs medical attention rather than home rest.

What Is Pneumonia?

What Is Pneumonia?

Pneumonia is an infection that inflames the tiny air sacs in one or both lungs, known as alveoli. In a healthy lung, these air sacs fill with air each time you breathe in, and oxygen passes through their thin walls into the blood. When pneumonia takes hold, the alveoli swell with inflammation and can fill with liquid or pus. This makes breathing painful, limits how much oxygen reaches the bloodstream, and can leave a person feeling exhausted even after simple effort.

Doctors often describe pneumonia by where it was caught and how widespread it is in the lung. Community-acquired pneumonia is picked up outside of hospitals and clinics, in everyday life, and it is by far the most common form. Hospital-acquired pneumonia develops during or shortly after a hospital stay and can be harder to treat because the germs involved are sometimes resistant to common antibiotics. Aspiration pneumonia happens when food, drink, vomit, or saliva is accidentally inhaled into the lungs, which can carry bacteria deep into the airways. There is also walking pneumonia, a milder form most often caused by a bacterium called Mycoplasma pneumoniae, where people stay on their feet and may not even realize their lingering cough is pneumonia.

It helps to understand what pneumonia is not. Colds and influenza mainly affect the nose, throat, and upper airways, while pneumonia reaches deep into the lung tissue itself, and bronchitis inflames the airways rather than the air sacs. This deep reach is why pneumonia can be more serious, especially for the very young, older adults, and people with weakened immunity.

Is Pneumonia Contagious?

The short answer: pneumonia itself is not directly “caught” the way a cold is — but the germs that cause it can spread from person to person. Whether you develop pneumonia after exposure depends on the type of germ, how much exposure you had, and how strong your immune defences are.

Bacterial pneumonia

The most common bacterial cause is Streptococcus pneumoniae (pneumococcus). These bacteria spread through respiratory droplets when an infected person coughs, sneezes, or talks. Bacterial pneumonia is considered contagious before treatment begins, but people generally become much less contagious after 24 to 48 hours of appropriate antibiotic treatment. Close household contacts are the most likely to be exposed.

Viral pneumonia

Viral pneumonia is frequently caused by the same viruses that cause colds and flu — influenza viruses, respiratory syncytial virus (RSV), and coronaviruses, among others. It is roughly as contagious as the underlying virus. If someone catches influenza from a person with flu-related pneumonia, they may develop an ordinary flu illness rather than pneumonia itself.

“Walking pneumonia” (mycoplasma pneumonia)

Caused by Mycoplasma pneumoniae, this milder form spreads through close, prolonged contact — in households, schools, dormitories, and military barracks. Because symptoms are often mild, people may not realise they are ill and can unknowingly pass the bacteria on.

Fungal pneumonia

Fungal pneumonia — caused by organisms such as Pneumocystis jirovecii — mainly affects people with weakened immune systems and is generally not spread from person to person.

Important: Even when the germs are contagious, not everyone who is exposed becomes ill. A healthy immune system often clears the organism before it reaches the lungs. Newborns, older adults, smokers, and people with chronic lung disease or weakened immunity are far more likely to develop pneumonia after exposure.

Causes & Risk Factors

Pneumonia is not a single disease caused by a single germ. Many different microorganisms can trigger it, and knowing the cause matters because it shapes the treatment.

Bacteria. The most frequent bacterial cause of pneumonia in adults is Streptococcus pneumoniae, often called the pneumococcus. Other bacteria, including Haemophilus influenzae and Mycoplasma pneumoniae, can cause it too. Bacterial pneumonia can appear on its own or as a complication after a cold or the flu weakens the airways.

Viruses. Viruses such as influenza, respiratory syncytial virus (RSV), and coronaviruses are common causes of pneumonia, especially in children and in seasonal outbreaks. Viral pneumonia can also make the lungs vulnerable to a second, bacterial infection on top of the first.

Fungi. Fungal pneumonia is less common, mostly affecting people with weakened immunity or chronic lung disease.

Risk is highest in adults over 65 and in young children. Chronic conditions such as asthma, COPD, heart disease, and diabetes make the lungs more vulnerable, as does smoking, which damages the airways’ natural cleaning mechanisms. Weakened immunity, from cancer treatment, long-term steroid use, or conditions such as HIV, also raises the danger, as does anything impairing swallowing or consciousness, including stroke and heavy alcohol use.

Symptoms

Pneumonia symptoms can range from mild to severe, and they often overlap with other respiratory illnesses, which is why diagnosis matters. The most common signs include:

  • Cough, often producing phlegm that may be greenish, yellow, or occasionally streaked with blood
  • Fever, sometimes with sweating and shaking chills
  • Shortness of breath, especially during activity that used to feel easy
  • Sharp or stabbing chest pain that worsens when breathing deeply or coughing
  • Fatigue and low energy, sometimes with muscle aches and loss of appetite
  • Nausea, vomiting, or diarrhea, which occur in some patients

In older adults, the classic signs can be subtle: an elderly person with pneumonia may have no fever but instead show new confusion, unusual sleepiness, or a lower-than-normal body temperature. Newborns may seem unusually fussy, feed poorly, or breathe with visible effort, so caregivers should take any unexplained change in the very young or very old seriously.

Illustration for What Is Pneumonia?

Tests & Diagnosis

A doctor usually begins with a careful history and physical examination. Listening to the chest with a stethoscope is a key step: pneumonia often produces crackling, bubbling, or rumbling sounds as air moves through fluid-filled air sacs. The doctor will also check breathing rate, oxygen levels, blood pressure, and temperature.

If pneumonia is suspected, several tests help confirm it and identify the cause:

  • Chest X-ray. The most important imaging test for pneumonia, it shows areas of inflammation and fluid in the lungs and helps rule out other conditions.
  • Blood tests. A complete blood count (CBC) can reveal a raised white cell count that points to infection. Blood cultures may be taken before antibiotics are started to check whether bacteria have entered the bloodstream.
  • Pulse oximetry. A small sensor clipped to a finger measures how much oxygen the blood is carrying, revealing whether the lungs are doing their job.
  • Sputum test. A sample of coughed-up phlegm can be examined and cultured in the laboratory to identify the specific germ causing the infection.
  • Arterial blood gas analysis. In severe cases, a blood sample from an artery measures oxygen and carbon dioxide levels precisely, showing how badly lung function is affected.
  • CT scan. Occasionally used when the chest X-ray is unclear or complications are suspected, giving a more detailed picture of the lungs.

These tests do more than confirm the diagnosis. Identifying the likely germ, whether bacterial, viral, or fungal, guides the choice of treatment, and measuring oxygen levels tells the doctor whether the patient can recover safely at home or needs hospital care.

Treatment Options

Treatment for pneumonia depends on its cause, its severity, and the patient’s overall health. Because of this, self-treatment with leftover antibiotics is never advisable; the wrong medicine can fail and encourage drug resistance.

Antibiotics are the mainstay of treatment for bacterial pneumonia. The doctor selects one based on the likely germ, local resistance patterns, and the patient’s age and other conditions. Antiviral medicines are used when a virus such as influenza is the cause, and they work best when started early in the illness. Fungal pneumonia is treated with antifungal medicines.

Supportive care matters just as much. Rest, plenty of fluids to loosen mucus, and medicines to bring down fever and ease pain help the body recover. Cough medicine is generally used sparingly, because coughing helps clear mucus from the lungs, but a doctor may recommend it if coughing prevents sleep.

Most people with mild pneumonia recover at home, but severe cases need hospital care: oxygen therapy when blood oxygen is low, intravenous fluids and antibiotics when medicines cannot be taken by mouth, and sometimes mechanical ventilation in intensive care. Hospitalization is more likely for people over 65, those with chronic illness or weakened immunity, and anyone with severe breathing difficulty or confusion.

Recovery takes time. Even after the infection clears, fatigue and a lingering cough can last for weeks. Follow-up chest examinations or repeat X-rays are sometimes recommended, especially for smokers and older adults, to make sure the lung has fully healed.

Illustration for What Is Pneumonia?

Lifestyle Management & Prevention

Several proven steps reduce the risk of pneumonia. Vaccination is the most powerful tool: the pneumococcal vaccine protects against the most common bacterial cause, and the seasonal influenza vaccine prevents the flu that often leads to pneumonia. A doctor can advise which vaccines are appropriate based on age and health conditions.

Good hygiene also helps: washing hands, covering coughs and sneezes, and avoiding close contact with people who have respiratory infections. Not smoking keeps the airways’ defenses intact, and keeping chronic conditions such as diabetes, asthma, and COPD well controlled strengthens the immune system’s ability to fight lung infections.

For people recovering from pneumonia, pacing is important. Gradually returning to normal activity, drinking enough fluids, avoiding smoke and dust while the lungs heal, and completing the full course of any prescribed medicine all support a complete recovery.

When to See a Doctor

Seek urgent medical care if you or someone you care for has:

  • Severe difficulty breathing, rapid or shallow breathing, or a bluish color of the lips or fingernails
  • Chest pain that is severe or worsening
  • A high fever that does not come down, or a fever that improves and then returns worse
  • Persistent vomiting that prevents keeping fluids or medicines down
  • New confusion, unusual drowsiness, or difficulty waking up, especially in older adults
  • A cough with large amounts of blood
  • Symptoms that worsen after several days of treatment, or fail to improve at all

Infants, adults over 65, pregnant women, and people with chronic illness or weakened immunity should seek care earlier, even with milder symptoms, because pneumonia can worsen quickly in these groups.

Key Takeaways

  • Pneumonia is an infection of the lung’s air sacs, which become inflamed and may fill with fluid, reducing oxygen delivery to the body.
  • Bacteria, viruses, and fungi can all cause pneumonia; the most common bacterial culprit is Streptococcus pneumoniae.
  • Classic symptoms include cough with phlegm, fever with chills, shortness of breath, and sharp chest pain, but older adults may show only confusion or unusual tiredness.
  • Diagnosis combines a physical examination with tests such as chest X-ray, blood tests, pulse oximetry, and sputum culture.
  • Treatment targets the cause, antibiotics for bacterial pneumonia, antivirals for viral cases, plus rest, fluids, and sometimes oxygen or hospital care.
  • Vaccination against pneumococcus and influenza, hand hygiene, and not smoking are the best defenses against pneumonia.

Frequently Asked Questions

Can you catch pneumonia from someone coughing?

The bacteria or viruses that cause pneumonia can spread through cough droplets, but whether you develop pneumonia depends on the germ and your immune defences.

How long is pneumonia contagious?

It varies by cause. Bacterial pneumonia is usually much less contagious after 24–48 hours of antibiotics; viral forms remain contagious as long as the underlying virus is active.

Can walking pneumonia spread at school?

Yes — mycoplasma pneumonia spreads through close, prolonged contact, which is why it moves through households, classrooms, and dormitories.

About the Reviewer

Dr. Ata Ullah — MBBS, MD Medicine, Physician Consultant. Dr. Ata Ullah is a Senior Medical Officer and Medical Specialist with extensive experience in internal medicine and the management of respiratory infections, including pneumonia.

“Your Health, Our Responsibility.”

Medical Disclaimer: This article is for informational purposes only and is not a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or another qualified health provider with any questions you may have regarding a medical condition.

Online Consultation: Dr. Ata Ullah (MBBS, MD Medicine), Physician Consultant / Medical Specialist — WhatsApp: 0315 7148181 — Consultation Fees: $30