Normal commercial jets drop gas masks when cabin pressure drops, and supply oxygen, but, where does that oxygen come from? Do commercial jets store oxygen? If they do, isn't pressurised oxygen very flammable and too hazardous to carry?
On commercial aircraft the oxygen supply of the masks in the cabin comes either from a chemical oxygen generator or a centralized oxygen bottle system. The flight deck is always equipped with pressurized oxygen masks.
The chemical oxygen generators generate lots of heat when they are activated. When normally placed in their overhead compartments the heat is slowly dissipated. However, oxygens generators are hazardous when canisters are not in their appropriate place. The ValuJet Flight 592 crash into the Everglades on 11 May 1996 was caused by a fire after improperly packed oxygen generators in the cargo hold were accidentally activated.
Pressurized oxygen bottles also are hazardous. Not only because the oxygen can turn a small fire into a blaze but if the high pressure bottles explode they cause substantial damage. On 25 July 2008 an oxygen bottle installed in a Qantas Boeing 747 ruptured and propelled itself upward through the floor into the cabin.
Airliners do not carry tanks of oxygen for the "rubber jungle" when the ox masks are deployed. The oxygen is created by chemical reaction within canisters stored in the overhead that are not activated until the rubber jungle drops down.
This chemical reaction does create a lot of heat. That's what caused the Valuejet fire and crash in the Florida everglades a few years ago. The canisters were being shipped and were not clearly marked as hazardous cargo, and other safety steps were missed that may have inerted the canisters.
Given the many millions probably billions of canister-hours that these devices have been used over the years, I would conclude they are safe. Given the disaster that happened when they were handled improperly for shipping, I would also say the airlines cannot lower their guard on shipping these apparently harmless canisters at any time, ever.
Wikipedia has an excellent article on the subject:
In some cases the oxygen masks are connected to a central oxygen supply (or more accurately, a supply of breathing gas, containing a mix of oxygen and other gas). The oxygen can also be generated using a chemical device, one for each oxygen mask or seat row.
Side note: contrary to what many people believe, oxygen is not required during normal flight. The outside air at high altitude still contains the same percentage of oxygen (21%) as on the ground. The outside air is pressurized and fed into the fuselage, allowing normal breathing.