Definition
Thermal runaway happens when the temperature inside a battery climbs abnormally high and sets off a chain of chemical reactions. The heat from those reactions pushes the temperature up even faster. Once it starts, it can keep releasing heat and flammable gas (and, depending on the cathode material, even oxygen) with no help from outside, so it easily spreads into a fire or explosion.
A dangerous cycle that feeds its own fire
Picture a single spark landing on dry leaves in the woods. The air around it heats up. As the temperature rises, even damp twigs dry out and catch fire, and soon the blaze is far too big to control.
The same thing happens inside the lithium-ion batteries in smartphones and electric cars. When a battery takes a hard hit or is overcharged and its inside gets hotter than about 80 to 100 degrees Celsius, the tiny protective film (called the SEI) that covers the negative electrode starts to break down.
Then the materials inside the battery touch each other and react violently, giving off a huge amount of heat. The problem is that this heat pushes the battery's temperature up by hundreds of degrees more. The hotter it gets, the faster the reactions go, and the more heat pours out. Once the battery is stuck in this loop where it keeps growing its own heat, the temperature can shoot up to several hundred degrees, sometimes close to 1,000, in a short time. That is thermal runaway.
Why water doesn't put it out easily
A regular wood or paper fire is fairly easy to put out. You soak it with water or smother it with a fire extinguisher. Fire needs oxygen to burn, so if you cut off the surrounding air, it can't breathe.
But a battery in thermal runaway often keeps burning, no matter how carefully you block oxygen from the outside. Heat keeps being made fresh inside it. On top of that, cathode materials (the key part that stores energy), such as nickel-based ones, release their own oxygen as they break down in the heat. In other words, the battery supplies the very oxygen that feeds its flames.
The liquid electrolyte inside the battery (the pathway ions travel through) also boils and produces a huge amount of flammable gas. When the sealed battery case can't hold that pressure and bursts, fierce flames and toxic gas blast out in all directions.
To be more precise: how can it be stopped?
To be more precise, thermal runaway often begins when the separator tears or melts. The separator is a thin film that keeps the positive and negative electrodes from touching directly. A tiny short circuit forms inside the battery, and one spot heats up first.
To prevent this, a battery pack includes a smart electronic brain called a battery management system (BMS). It constantly monitors the temperature, voltage, and current of every cell. If it sees signs of overheating, it cuts off the charge and discharge current to reduce the danger. Still, thermal runaway that starts from a short circuit inside a cell may not stop even when the current is cut.
Battery makers also pack in special insulating material so that if one cell catches fire, the heat doesn't spread to its neighbors. Researchers are also working hard on solid-state batteries, which use a solid electrolyte that doesn't burn, and on designs that hold up better against impact.
Common misconceptions
You can quickly put out a battery fire with a regular fire extinguisher by cutting off the oxygen.
As the materials inside the battery break down, they give off their own oxygen, so blocking oxygen from the outside doesn't put the fire out easily. That's why the usual approach is to pour a large amount of water on it for a long time to cool it down.
Where you meet it
After an electric car's battery takes a hard hit, huge flames shoot up within a short time.
A damaged smartphone battery swells up badly, then gives off smoke and burns.
In one sentence
Heat inside a battery causes more heat in a vicious cycle, and the temperature explodes upward in no time.