Pulmonary edema (pulmonary oedema in British English) is fluid in the lungs ("Pulmonary" means "lungs"; "edema" means "swelling" or "fluid"). Normally, the lungs fill with air when a person breathes in. From the alveoli in the lungs, oxygen goes into the blood. The blood then carries oxygen to the entire body. Every part of the body needs oxygen to survive.

When a person has fluid in their lungs (pulmonary edema), there is not enough space left for air to get into the lungs. The person will not be able to breathe in as much air. This means not as much oxygen will get into the blood, and the body will not get the oxygen it needs.

Causes
The most common cause of pulmonary edema is heart failure on the left side of the heart. The left side of the heart is supposed to pump blood to the entire body. If the left side of the heart is too weak to do this, blood will back up into the lungs.  This is called cardiogenic pulmonary edema.  ("Cardiogenic" means "caused by the heart.")

Other, non-cardiogenic causes of pulmonary edema include:
 Fluid overload: When a person with kidney failure eats too much salt or drinks too much fluid.  Because the kidneys cannot filter out fluids like they normally do, the fluid backs up into the lungs. 
 Smoke inhalation
 Drowning in salt water
 High-Altitude Pulmonary Edema (HAPE), which happens when people are at very high altitudes, like climbing mountains
 Hypothermia (a very low body temperature)
 Acute Respiratory Distress Syndrome, caused by some kind of lung illness (like pneumonia or sepsis) or injury (like smoke inhalation)
 Pulmonary embolism, where a blood clot from one part of the body travels to the lungs
 Injury to the chest or lungs
 Infections caused by viruses, like dengue fever
 Bad reactions to drugs, including illegal drugs like heroin and cocaine, and legal medicines like aspirin

Symptoms
Symptoms of pulmonary edema may include:
 Difficulty breathing
 Orthopnea (breathing is hardest when lying down)
 Paroxysmal Nocturnal Dyspnea (this means that difficulty breathing may wake the person up when they are sleeping at night)
 Pink, frothy sputum
 A medical professional will hear rales when they listen to breath sounds with a stethoscope

Flash pulmonary edema 
Flash pulmonary edema is a medical emergency.  It is pulmonary edema that comes on very quickly.  Usually pulmonary edema takes a few hours to develop.  But in the worst cases of flash pulmonary edema, a person's lungs can fill completely with fluid in minutes.  Flash pulmonary edema can also be caused by moving a person with pulmonary edema, or lying them down.

Treatment
No matter what the cause is, pulmonary edema can be treated by:
 Giving the person oxygen
 Sitting the person straight up (this makes it easier to breathe)
 Forcing air into the person's lungs (this is called ventilation) if needed
 Diuretic medicines, which remove extra fluid from the body
 Medicines like nitroglycerine ("nitro"), which reduce the pressure caused by fluid going into the lungs.  Nitroglycerine can also make the blood vessels in the lungs wider, so more fluid fits into them; this can free up some extra space for air to get into the lungs.

Other treatments can focus on the cause of the pulmonary edema. For example, if a person with kidney failure has had too much salt or fluid, they can have dialysis to take away the extra fluid and salt.

References

Diseases
Pulmonology