Pneumonia is an infection in one or both lungs. Bacteria and viruses are the most common causes of pneumonia. Fungi can induce pneumonia, too. The infection causes inflammation in the air sacs of the lungs. This results in a buildup of fluid that makes it hard to breathe. Pneumonia can be a medical emergency, especially among high-risk groups like people over 65 and children 5 or younger.

Pneumonia typically affects the lungs, but complications can lead to problems in other areas of the body, too. These can be very serious and even deadly. Your risk, treatment, and recovery time depend on what caused the infection, your age, and any additional health issues you had before getting pneumonia.

A bacteria or virus enters the body through an airway. Once the infection gets into the lungs, inflammation causes air sacs, called alveoli, to fill up with fluid or pus. This can lead to trouble breathing, coughing, and coughing up yellow or brown mucus.

Breathing may feel more difficult or shallow. You may experience chest pain when you take a deeper breath.

The buildup of fluid in and around the lungs leads to more complications. Fluid that collects in one area is called an abscess. If the abscess doesn’t go away with antibiotic treatment, it may need to be surgically removed. Fluid that forms between the covering of the lungs and inner lining of the chest wall is called a pleural effusion. An infected pleural effusion will need to be drained. A chest tube is usually used to do this.

If the infection and fluid buildup get severe enough, it can stop the lungs from doing their job.

When the lungs are unable to add oxygen to the blood and remove carbon dioxide at the correct levels, respiratory failure can occur. Signs of respiratory failure include:

  • fast breathing
  • feeling like you can’t breathe in enough air
  • confusion
  • feeling sleepy
  • lips or fingernails becoming a bluish color

Seek immediate medical attention if you’re experiencing respiratory failure. It can be treated with oxygen therapy or by using a ventilator, which is a machine that supports breathing.

One of the earlier signs of pneumonia caused by bacteria is a fast heartbeat. This may be linked to a high fever.

A pneumonia infection can spread from the lungs into the bloodstream. This is a serious complication. It can reach other major organs and result in organ damage or even death. The spread of bacteria through the blood is called bacteremia. Its potentially deadly result is called septic shock.

Septic shock can cause very low blood pressure and a reduced blood flow to the body’s major organs. When the organs don’t get enough blood and oxygen, they become damaged and eventually shut down (organ failure).The lungs are responsible for adding oxygen to the blood and removing excess carbon dioxide. If they are unable to do this, your major organs can get too much carbon dioxide and not enough oxygen. If not treated, this will also lead to organ damage and failure.

There’s also some evidence that having pneumonia puts someone at a higher risk for having a heart attack. This risk lasts through recovery and can remain higher than normal even years after the infection.

The body’s immune system helps fight off harmful bacteria and viruses. A person with a normal, healthy immune system is typically able to recover from pneumonia after treatment with antibiotics and rest.

People who have a weakened immune system due to another condition, like HIV or cancer that’s being treated with chemotherapy, are at a higher risk for developing pneumonia and experiencing complications.

As the body tries to fight an infection, weakness or muscle soreness may also occur. This is more common with pneumonia caused by a virus.

If pneumonia induces a fever, chills can be a symptom of the fever. Chills happen when muscles expand and contract.

If left untreated, a urinary tract infection can spread and lead to pneumonia. However, this isn’t as common.

The infection can also be carried from the lungs through the bloodstream and into the urinary tract.

Two types of pneumonia-causing bacteria, Streptococcus pneumoniae and Legionella pneumophila, can also be found in the urine. Doctors may use a urine test to confirm pneumonia and determine treatment options.

In some cases, like pneumonia caused by the flu virus, nausea and vomiting are common side effects.

For most people, pneumonia is treatable. It’s also preventable. Learn more about pneumonia treatments and how to protect yourself from the infections that cause it.