What Is Pneumonia?

In This Article
Table of Contents

Pneumonia is an infection that occurs in one or both lungs and can range from mild to life-threatening. Some cases of pneumonia will cause a problem in one lobe (segment) of one lung, while serious cases can affect all five lobes. Pneumonia is often caused by bacteria, but can also be caused by a virus or even fungus, in rare cases. Treatment typically includes one or more antibiotics taken by mouth when it can safely be treated at home, or intravenous (IV) treatment in a hospital setting in more serious cases.

There are four types of pneumonia:

  • Community-acquired pneumonia: This type of pneumonia is acquired outside of a hospital and care facility setting.﻿﻿ It is not contagious except in certain cases of Mycoplasma pneumonia, which can spread in crowded environments.
  • Hospital-acquired pneumonia: This type, picked up during a hospital stay, is also bacterial and tends to be more severe than community-acquired pneumonia because you're already sick, so your immune system is low.﻿﻿ The bacteria you contract may also be more resistant to antibiotics.
  • Healthcare-acquired pneumonia: This is a bacterial pneumonia that's picked up when you're living in a long-term care facility or regularly going to an outpatient clinic.﻿﻿
  • Aspiration pneumonia: This type of pneumonia can develop when you inhale food, drink, gum, vomit, or saliva into your lungs.
Common symptoms of pneumonia
 Illustration by JR Bee, Verywell 

Pneumonia Symptoms

Pneumonia increases sputum, which is a mixture of saliva and mucus, and causes it to take on a pus-like, thicker, and colored appearance. This collects in your lungs' alveoli and leads to a severe cough in many cases, which is your body's way of trying to clear the collection of fluid out. The infection also causes your airways to become inflamed. All of this makes your body have to work a lot harder to get enough oxygen for normal daily activities.

The signs and symptoms of pneumonia can vary from person to person. One person may be short of breath while another may experience only a severe cough. These are the most common signs and symptoms of pneumonia:

  • Fever, sweating, and/or chills
  • Cough, often severe, that produces phlegm
  • Shortness of breath
  • Difficulty breathing
  • Chest pain when coughing or breathing deeply
  • Feeling weak
  • Fatigue
  • Changes in mental status in people age 65 or older
  • Loss of appetite
  • Nausea, diarrhea, or vomiting


Pneumonia is caused by bacteria, viruses, or fungi, which cause infection and inflammation in the air sacs of your lungs. A bacterial pneumonia infection is the most common type, with fungal being the least common. People may get pneumonia after already being sick with a respiratory illness like a cold or the flu.﻿﻿

The populations most at risk for pneumonia are children age 2 or younger and adults 65 or older, though it can affect all ages. Individuals with chronic health problems, such as diabetes or heart disease, are at higher risk than the average person, as are people with respiratory problems like asthma or chronic obstructive pulmonary disease (COPD).

Individuals who have weakened immune systems, such as people with cancer or human immunodeficiency virus (HIV), and those taking medications that suppress the immune system are also at increased risk of developing pneumonia. People who aspirate, meaning their food, drink, vomit, or saliva accidentally goes into the airway instead of the esophagus, are at high risk for pneumonia.

If you have surgery, you're at high risk for pneumonia for several reasons.﻿﻿ Because you're unable to cough or protect your airway while you're under anesthesia, if you were to vomit during surgery, you would be unable to start coughing to try to remove the foreign material from your lungs. You can also have difficulty coughing after surgery because it makes your pain worse. This allows secretions to build up in the lungs and lead to chest congestion or pneumonia.


Your doctor diagnoses pneumonia based on your symptoms, abnormal sounds in your lungs, and tests. These tests may include a blood test to try to identify if the pneumonia is bacterial, viral, or fungal; a chest X-ray to see if there is fluid in your lungs; pulse oximetry to measure the amount of oxygen in your blood; and a sputum test, in which a sample of the phlegm you cough up is sent to the lab to help figure out the cause of your pneumonia.

If you're 65 or older, are hospitalized, or have other illnesses or a compromised immune system, you may also have a computerized tomography (CT) scan of your chest and/or a fluid culture taken from your lungs.﻿﻿ This helps your doctor further pinpoint what's causing your illness.


Treatment for pneumonia varies widely based on the cause of the infection and the severity of symptoms.﻿﻿ The most common treatments for pneumonia are antibiotics, respiratory treatments, and over-the-counter medications. Antibiotic therapy only works for bacterial pneumonia, however.

If you're having trouble getting enough oxygen, you may need to be hospitalized and given supplemental oxygen. Severe cases may require a stay in the intensive care unit (ICU), intubation, or the use of a ventilator along with around-the-clock care, but this is uncommon.


Although antibiotics like penicillin were once very effective in treating pneumonia, the disease has mutated and many bacteria that cause it are becoming resistant to modern antibiotics. That's all the more reason to do what you can to prevent the condition.

The pneumonia vaccine may be appropriate for you, depending on your age, risk factors, and medical history.﻿﻿ There are different vaccines for kids under 2 and those between ages 2 and 5. Ask your doctor about whether or not you and/or your child need this vaccine.

If you're not in a high-risk group, simple measures to protect yourself from an illness like washing your hands, staying away from sick people, and getting your flu vaccine, can go a long way. Although the flu vaccine doesn't prevent pneumonia itself, influenza can lead to the condition. The flu shot is highly recommended for people in high-risk groups as well for this reason.

In addition, if you have surgery, walking as early as possible afterward is a great way to stay healthy and recover quickly. Coughing when you feel the need to, rather than stifling the urge because of pain, is important. Bracing yourself with a pillow can help.

A Word From Verywell

Pneumonia is a serious illness that can become life-threatening, but most people who get it recover. It's important to pay attention to your symptoms and seek medical care when you need it. If you're having trouble breathing or it hurts to cough, contact your healthcare provider.

Your treatment plan will depend on which type of pneumonia you are diagnosed with, so be sure to follow your provider's advice and take any medications as prescribed. If you need to take antibiotics, don't stop taking them just because you feel better. Not completing the course can mean that you only partially treat your infection and that the bacteria can develop resistance to the antibiotics.

Was this page helpful?
Article Sources
  1. Almirall J, Serra-prat M, Bolíbar I, Balasso V. Risk Factors for Community-Acquired Pneumonia in Adults: A Systematic Review of Observational Studies. Respiration. 2017;94(3):299-311. doi:10.1159/000479089

  2. Frantzeskaki F, Orfanos SE. Treating nosocomial pneumonia: what's newERJ Open Res. 2018;4(2):00058-2018. doi:10.1183/23120541.00058-2018

  3. Komiya K, Ishii H, Kadota J. Healthcare-associated Pneumonia and Aspiration PneumoniaAging Dis. 2014;6(1):27–37. doi:10.14336/AD.2014.0127

  4. Morris DE, Cleary DW, Clarke SC. Secondary Bacterial Infections Associated with Influenza PandemicsFront Microbiol. 2017;8:1041. doi:10.3389/fmicb.2017.01041

  5. Chughtai M, Gwam CU, Mohamed N, et al. The Epidemiology and Risk Factors for Postoperative PneumoniaJ Clin Med Res. 2017;9(6):466–475. doi:10.14740/jocmr3002w

  6. Garin N, Marti C, Scheffler M, Stirnemann J, Prendki V. Computed tomography scan contribution to the diagnosis of community-acquired pneumoniaCurr Opin Pulm Med. 2019;25(3):242–248. doi:10.1097/MCP.0000000000000567

  7. Mantero M, Tarsia P, Gramegna A, Henchi S, Vanoni N, Di Pasquale M. Antibiotic therapy, supportive treatment and management of immunomodulation-inflammation response in community acquired pneumonia: review of recommendationsMultidiscip Respir Med. 2017;12:26. doi:10.1186/s40248-017-0106-3

  8. Principi N, Esposito S. Prevention of Community-Acquired Pneumonia with Available Pneumococcal VaccinesInt J Mol Sci. 2016;18(1):30. doi:10.3390/ijms18010030

Additional Reading