Did you know…
What happens if an airplane cabin depressurizes?
Short answer
Oxygen masks drop automatically and the pilots begin an emergency descent to about 3,000 m (10,000 ft), where breathing without assistance is possible. The maneuver takes just a few minutes and is well trained; the real risk is time of useful consciousness, which falls to 15-20 seconds at 12,000 m.

What happens in the first seconds
An airliner's cabin is kept at a pressure equivalent to between 1,800 and 2,400 m (6,000-8,000 ft) of altitude, even though the aircraft flies at 11,000. If that pressure is lost, the cabin air equalizes with the outside. In a rapid decompression a brief fog appears from condensing water vapor, along with a loud noise, a blast of cold and pressure in the ears.
The immediate danger is hypoxia. Time of useful consciousness—the seconds during which a person retains the ability to act effectively—drops sharply with altitude: at 12,000 m (40,000 ft) it's just 15 to 20 seconds. That's why crews insist on putting on their own mask before helping anyone else: someone who delays to help another may lose the ability to do both.
The crew's response
Pilots have positive-pressure masks within reach, designed to be put on in under five seconds. After securing their own oxygen, they start an emergency descent: reducing thrust, extending speed brakes and descending at the maximum permitted speed down to 3,000 m (10,000 ft), an altitude at which ambient air is enough to breathe. The descent can be completed in a few minutes.
The cabin generators
Passenger masks aren't connected to a shared tank: on most aircraft each panel has a chemical generator that produces oxygen when the mask is pulled, for a limited period covering the time needed to descend. That's why you need to pull the tube firmly, not just bring the mask close to your face. The aircraft itself is designed to fly without problems at low altitude; decompression forces a landing at the nearest suitable airfield, but it doesn't compromise the structure.
More questions

Foto: 4300streetcar (CC BY 4.0) Commercial aviation
Which 747 carried Enterprise "piggyback"?
The first Shuttle Carrier Aircraft was a Boeing 747-123 registered N905NA, originally built for American Airlines and acquired by NASA in 1974. Boeing… more…

Commercial aviation
Was there an amphibious DC-3?
Yes: the Douglas XC-47C was created by fitting Edo Model 78 floats onto a standard C-47. The single-step metal floats carried retractable wheels that also… more…
_Berliner_Luftbr%C3%BCcke.jpg)
OTFW, Berlin (CC BY SA), vía commons Commercial aviation
Was a C-47 converted into a glider?
Yes: the Douglas XCG-17 was an assault glider created by converting a twin-engine C-47 Skytrain during World War II. Its engines were removed and the nacelles… more…

Commercial aviation
What did the USSR build from the DC-3?
The USSR built a version of the DC-3 under a licence granted to its government on 15 July 1936. It was designated PS-84 and, in 1942, renamed Lisunov Li-2… more…

Commercial aviation
What was "Puff, the Magic Dragon"?
It was the nickname of the Douglas AC-47 Spooky, the first in a series of fixed-wing gunships developed by the United States Air Force during the Vietnam War… more…

Commercial aviation
How did the RAF refer to the C-47?
The RAF called it Dakota: the Dakota I was the designation for 53 C-47s received under Lend-Lease. The Dakota III designated 962 C-47A Skytrains. The Dakota… more…