Actually, that was a trick question. You're always on fire when flying in a jet. Two fires are always (or should be) burning on an airborne 737, three if you've got the APU running. Burning fires are how a jet engine works. No firee, no workee. Unlike the engine in your car, which needs the fire to be relit by the spark plugs at every cycle of the piston, the fire in the hot section of a turbine engine is lit once when the engine is started, and is then self sustained with no external ignition source until the fuel source is cut off at engine shutdown.
Of course there are safety systems in place to relight the engine should the flame go out for some reason, but this system would only be used in an emergency. But what kind of things might make the fire go out or cause a flameout as we say in the biz? As any boy scout can tell you, a fire needs three things: fuel, oxygen, and ignition. Obviously, running out of fuel would be one reason to cause a flameout. In 1978, a United Airlines DC-8 crashed for just that reason. The crew became preoccupied with a landing gear problem and simply ran the jet out of gas and crashed. The only silver lining was that relatively few people were killed due to no post-crash fire. The fuel tanks were empty. Extreme rain ingestion has also been known to cause engines to flameout though modifications to intakes have minimized this problem by diverting rain away from the hot section of engines.
But getting back to fire, it is very useful when it is controlled and stays where it's supposed to. What happens when it escapes? On an airplane, nothing good. The short answer is you either land, put it out quickly, or die. An uncontained fire on an airplane is probably the worst thing that can happen to any pilot short of hitting the ground. Besides all of the usual problems associated with fire such as smoke and heat, on an airplane you can't escape and the clock is ticking as the fire destroys the systems used to control the airplane.
On May 11, 1996, ValueJet 592, a DC-9, crashed into the Florida Everglades after catching on fire shortly after departing from Miami. The accident report stated that the cause of the fire was improperly loaded oxygen generators stored in the cargo compartment which caught fire shortly after takeoff. What is notable about this accident is that the crew became aware of a problem just six minutes after takeoff, and crashed into the swamp about three minutes later. It took that long for the intense fire to sever the control cables. In the aftermath, airlines were required to install cargo fire warning and suppression systems though they would not have saved that fated airliner due to the burning oxygen generators providing their own oxygen.
On September 2, 1998, Swissair 111, a McDonnell Douglas MD-11, crashed into the North Atlantic just off of Nova Scotia after a fire broke out in the space between the cockpit and the fuselage killing all 229 passengers and crew. The investigation revealed that insulation installed in the walls of the aircraft likely caught fire from a wiring defect. Aircraft systems were quickly compromised by the fire and the aircraft hit the water 21 minutes after noticing odors from the fire and only 30 miles from Halifax. The crew was faulted for taking time to dump fuel and run checklists, but it's not clear if a direct route to Halifax would have mattered as the flames spread so quickly. The pilots' flight manuals were found to have been melted indicating that they were using them to beat back the flames before hitting the water.
On July 17, 1996, TWA Flight 800 crashed off the coast of Long Island shortly after takeoff from JFK Airport enroute to Paris. All 230 passengers and crew were killed. While the aircraft was not technically brought down by a fire, the investigation focused on the possibility fuel-air explosion in the center wing fuel tank after discounting terrorist activity. The mixture of fuel fumes and air in the space above the fuel in that tank, or ullage, was believed to have become volatile due to heating from the air conditioning pack which had been used extensively on the ground due to a delayed departure. It was believed that ignition was provided by a voltage anomaly or short circuit which was then transmitted to the tank through the fuel quantity measuring system. The takeaway from this accident has been the introduction of nitrogen gas inerting systems designed to keep the fuel ullage non-volatile.
Ironically, an uncontained fire on a pod-mounted engine, which most airliners have, is not as serious a situation as a fuselage or cargo compartment fire. All airliners are equipped with engine fire suppression systems consisting of bottles of fire retardant which can be discharged into a burning engine. But should the engine fire not go out, it will simply stay in the engine. The slipstream will likely keep the fire from travelling up the engine strut to the wing. Fuel and hydraulic fluid can be cut off to a burning engine using fire control switches in the cockpit. The extinguishing agent used in these systems, a type of Freon, is no longer manufactured due to environmental concerns about ozone depletion, but enough supplies remain for current needs.
We've covered a variety of causes of and reactions to aircraft accidents caused by onboard fires. While extremely rare, an airborne fire is an extremely serious event. It's one of the reason's that aircrews have so little sense of humor when passengers smoke in restrooms, and toss smoldering butts into the trash. That reinforcement you see around the trash container door is designed to contain an explosive fire. There are also smoke detectors and extinguishers in restrooms for that reason. The latest concerns about fires have concerned aging wiring bundles which can explode rather dramatically when they get moist. Aging or flammable insulation is also a concern.
While flying remains one of the safest modes of transportation, all pilots are aware of those who have gone before and done battle with this particular demon. It is not one which takes many prisoners. The ill-fated Concord in the above photo hit a piece of debris on takeoff which shredded a tire that punctured the fuel tank. The leak was then ignited by the engines. There were no survivors. If you're ever unlucky enough to be on an airplane which catches fire, expect a rough ride because the folks up front know the clock is ticking.