Altitude sickness is a condition caused by lower oxygen levels at high elevations. When you travel from a low altitude to a high one, it takes your body time to adjust. Your lungs and heart have to make an extra effort to compensate for less oxygen. There are three types of altitude sickness: acute mountain sickness, high-altitude pulmonary edema and high-altitude cerebral edema. Acute mountain sickness is the most common form of altitude sickness, and it's the least dangerous. It usually passes in a few days, provided that you take it easy and not ascend any higher while you still have symptoms. The other two kinds of high-altitude sickness are much more dangerous; they're rare but can be fatal.
One of the best ways to prevent and cope with altitude sickness is to drink plenty of fluids. Hydration is a key factor in warding off symptoms such as headache, nausea, fatigue, shortness of breath, dizziness and difficulty sleeping. Take in around a gallon (three or four liters) of fluids a day. The difference in air pressure between high and low altitudes can affect more than just the oxygen levels in your blood; it can also affect your electrolytes, fluid levels and salt levels. For this reason, eating small but frequent meals that include easy-to-digest carbohydrates and some salt are good for preventing altitude sickness. Grains, pasta and bread are all recommended to help you adjust to a high altitude. Avoid alcohol and caffeine, especially for the first few days as your body adjusts.
If you're out hiking or skiing, you need to be extra careful to hydrate regularly and to keep eating. A trick to get both carbohydrates and fluids into you is to drink sports drinks or juice. Similarly, soup is also a good food for people trying to avoid altitude sickness.