Decompression sickness

Decompression sickness is caused by bubbles which form in the blood and other body parts of people who have the pressure around them decrease too quickly. These bubbles may block the flow of blood and starve the body parts of oxygen, or the bubbles may cause damage by stretching, tearing, or pressing on the affected parts. Decompression sickness is also called "the bends."
Who can get decompression sickness?
Decompression sickness can happen to underwater divers who spend a lot of time in deep water, and return to the surface too quickly for the breathing gases dissolved in their bodies to escape without forming bubbles.
People can also get decompression sickness if they are in a pressurised aeroplane or spacecraft and it is damaged and the air is lost.
How to prevent decompression sickness.
Decompression sickness can be prevented by decreasing the pressure slowly. This allows the gases which have dissolved in the body to get out in the breathing air without forming bubbles. Divers do this by coming up to the surface slowly, as the pressure depends on the depth, and reducing the depth will reduce the pressure. For each ten metres change of depth the pressure will change by 1 bar, which is about the same as normal air pressure at sea level.
Divers find out how slowly to come up by using decompression tables or a dive computer. They may need to stop on the way up to wait for enough gas to get out before it is safe to go up further. This is called a decompression stop. The tables or computer will inform the divers what depths they must stop at and how long they must stay at each depth.
People flying high in aircraft avoid decompression by being in a pressurized cabin. In military aircraft the crew may breathe oxygen before the flight for a few hours so most of the nitrogen that is dissolved in their bodies can escape. This is called oxygen prebreathing.
Astronauts preparing for a spacewalk also prebreathe oxygen and decompress inside the spacecraft before getting into their suit and going outside.
What is actually happening?
When a person breathes, the air or other breathing gas dissolves into the blood from the lungs. This takes some time, and the amount of gas that can dissolve depends on the pressure around the person. If the pressure is greater, more gas can dissolve. After a while no more gas can dissolve at that pressure.
When a diver goes deeper, the pressure gets greater. This makes more gas dissolve in the diver. At the end of the dive the diver must return to the surface of the water where there is less pressure. 
If the diver goes up slowly the pressure will change slowly, and there will be enough time for the gas dissolved in the diver to return from the blood to the breathing gas in the divers lungs and it will be safely removed. If the pressure change is too quick for enough of the dissolved gas to be removed, the gas may form bubbles in the blood and other parts of the diver's body. These bubbles will get bigger when the pressure gets less as the diver gets nearer to the surface. Bubbles which are in the blood may get stuck in small blood vessels. If this happens in the lungs they will usually do no great harm but if they block the blood flow in other parts of the body, the parts where the flow is blocked will not get enough oxygen and may be damaged. This is very dangerous if it happens in the brain or heart. The other place where bubbles may form is in the more solid parts of the body. If these bubbles grow enough they may tear the parts around them or press against them hard enough to do damage.
Treatment for decompression sickness.
If a diver gets decompression sickness it can be treated by putting the diver in a decompression chamber, and increasing the pressure to squeeze the bubbles to a smaller size where they do less harm, and by giving the diver pure oxygen to breathe, which helps to get the bubbles to dissolve again. The oxygen also helps to stop more damage to the body by the bubbles which have blocked blood vessels, as there is more oxygen in the blood to keep the parts alive which have less blood supply because of the blockages.