High altitude pulmonary edema (HAPE) is a form of altitude sickness in which there is life-threatening fluid accumulation in the lungs of people who are at high altitudes. It is typically caused by rapid ascent without allowing the body time to acclimate.
While there are certain risk factors such as the ascent rate, cold exposure, intensity of physical exertion and underlying medical conditions such as pulmonary hypertension, HAPE can occur in anyone
Treatment involves descending to a lower altitude and providing supplemental oxygen. In certain cases steroids and even hyperbaric treatment maybe necessary. The best way to prevent this is to climb slowly (no more than 1000ft/day) and allow the body to acclimate to the altitude