Pneumonia: Causes, Symptoms and Treatment

A woman coughing and holding her throat.
Pneumonia typically causes coughing and difficulty breathing. (Image credit: Shutterstock)

Pneumonia is a broad term for a common lung infection typically caused by bacteria or viruses. The illness can also be a complication of the flu

When something like bacteria, for example, gets into lung tissue, it causes an inflammatory response, which leads to the production of mucus, said Dr. Maureen Dziura, a lung specialist at Tufts Medical Center in Boston. An accumulation of mucus can trigger some symptoms of pneumonia, such as a cough, shortness of breath, fever and chills, she said.

The illness can be mild, which is known as walking pneumonia, or it can be serious if the symptoms are severe, and may require hospitalization, Dziura said. Bacterial pneumonia is the most common form of the illness and also tends to be the most serious type. 

With pneumonia, the alveoli, or air sacs, in one or both lungs become inflamed and fill with fluid. This makes it difficult for oxygen to reach the bloodstream. (When both lungs are infected, it's called double pneumonia.)

More than 250,000 people have to seek care in a hospital for pneumonia each year in the United States, and about 50,000 Americans die annually from it, according to the Centers for Disease Control and Prevention (CDC).

What causes pneumonia?

Pneumonia can be caused by bacteria, viruses and fungi. However, bacteria are the most common cause of pneumonia in adults, and the most frequent culprit is Streptococcus pneumoniae. Walking pneumonia is usually caused by a bacterium called Mycoplasma pneumoniae

Viruses, such as influenza (flu) virus and rhinovirus, can also lead to pneumonia. Other viral causes include respiratory syncytial virus (RSV), which is a common cause of pneumonia in babies and young children, and human metapneumovirus, according to the National Heart, Lung, and Blood Institute

One example of a fungal cause of pneumonia is Pneumocystis jirovecii, which causes a serious life-threatening infection typically found in people with weak immune systems, such as those with HIV and AIDS. (This illness was previously called Pneumocystis carinii pneumonia.)

Pneumonia can happen any time of year, but more cases tend to occur in winter when the flu season takes off, Dziura said. Flu can cause viral pneumonia and can weaken immune defenses, which increases the risk of developing a secondary bacterial pneumonia, she explained. 

People of all ages can get pneumonia, but those most at risk for the lung infection are children under age 5, adults 65 and over, cigarette smokers and people with other health problems or weak immune systems, such as chronic lung problems, heart failure, diabetes and stroke. 

Viral and bacterial forms of pneumonia can typically spread when an infected person coughs or sneezes, which releases droplets containing bacteria or viruses into the air that other people can breathe in or touch on contaminated surfaces. Most people who spend only a short amount of time with an infected person will not become ill, but there are some bacterial types of pneumonia that can spread quickly in people who live or work in crowded settings, such as college dorms, military barracks or nursing homes. 

Symptoms of pneumonia

The symptoms of pneumonia can range from mild to life-threatening. A person with walking pneumonia may feel weak and fatigued, and have a low-level cough, but is still able to attend work or school, Dziura said. A more serious infection causes a dangerously high fever, shortness of breath, blueness of the lips due to a lack of oxygen in the blood and mental confusion. 

With some forms of pneumonia, a person may cough up greenish or yellow mucus, or possibly bloody mucus (but pneumonia doesn't always cause you cough up mucus). According to the American Lung Association, symptoms of pneumonia may include: 

  • Cough
  • Fever
  • Chest or stomach pain
  • Shortness of breath
  • Chills
  • Loss of appetite
  • Lack of energy and fatigue
  • Confusion, especially in older people
  • Headache

A doctor may listen to a patient's lungs for a crackling sound that when the patient breathes, which would indicate an infection. (Image credit: Shutterstock)

Diagnosis and treatment

Pneumonia is a very common illness but can sometimes be tricky to diagnose because the symptoms are often similar to having a cold. To diagnose pneumonia, a doctor will use a stethoscope to listen for a crackling sound in the lungs when the patient breathes in, Dziura said. A chest X-ray can show the extent of inflammation in the lungs. 

Patients may also be asked for a sputum (a mixture of saliva and mucus) sample that gets examined to identify the strain of bacteria causing pneumonia, which helps doctors to tailor antibiotic treatment, Dziura said. 

In at least 50% of cases, the specific bacteria causing pneumonia can't be identified, Dziura said. So, the antibiotic given is based on the most common bacterial causes of pneumonia. 

People with bacterial pneumonia usually start feeling better within 48 hours after receiving antibiotics, but a course of antibiotics is typically taken for five to 10 days, Dziura said. However, the cough caused by pneumonia can linger for up to three months after treatment has ended because of residual inflammation in the lungs that takes longer to subside, she said.

Antibiotics won't help treat viral pneumonia. Its symptoms, such as fever and cough, are managed with rest, aspirin, cough medicine and drinking plenty of liquids. Experts also recommend running a humidifier to keep the air moist, which helps loosen excess phlegm in the lungs and sinuses.

For some older adults and people with chronic lung problems or weak immune systems, pneumonia can quickly become life-threatening. People may experience serious complications as a result of the infection, such as trouble breathing in enough oxygen; a build-up of fluid around the lungs; or sepsis, a condition where there is uncontrolled inflammation in the body, which may lead to widespread organ failure.

Ways to avoid getting pneumonia

One of the keys to preventing the spread of pneumonia is to avoid close contact with people known to be infected with colds and flu, Dziura said. Other ways to prevent the illness include: 

  • Getting vaccinated: A yearly flu shot can help prevent influenza and is also good protection against pneumonia. There is also a vaccine to prevent pneumococcal pneumonia, the most common form of bacterial pneumonia. This vaccine is recommended for children under age 2 as well as for adults 65 or older. The shot is also advised for children and adults at increased risk for pneumonia because they have other health conditions or weakened immune systems. 
  • Keeping hands and surfaces clean: Wash hands frequently— after using the bathroom, blowing your nose, changing a diaper, preparing foods or before eating. Disinfect surfaces touched often, such as faucets, doorknobs, phones, toys and light switches. 
  • Quitting smoking. Cigarette smokers are at increased risk for pneumonia because tobacco damages the lungs' ability to fight infections. That's why smokers are advised to get the pneumococcal vaccine.
  • Maintaining a strong immune system. Eating a healthy diet, plus regular exercise and sufficient sleep, can all protect against getting sick. 

Additional resources: 

Live Science Contributor

Cari Nierenberg has been writing about health and wellness topics for online news outlets and print publications for more than two decades. Her work has been published by Live Science, The Washington Post, WebMD, Scientific American, among others. She has a Bachelor of Science degree in nutrition from Cornell University and a Master of Science degree in Nutrition and Communication from Boston University.