Light and rechargeable, the Li-ion battery powers our world everything from mobile phones, cameras and computers to electric cars and recently also e-cigarettes.
In rare cases, they can be dangerous, overheating and exploding causing injuries and fires.
Some airlines have banned bulk shipment of Li-ion batteries after tests showed that failure in one can cause a potentially catastrophic chain reaction.
In a study published in the journal Nature Communications, scientists said they now have better insight into how the failure happens.
"This new technique will provide a capability for evaluating different batteries, and how they age, degrade and fail," according to study co-author Paul Shearing from University College London (UCL).
Hundreds of millions of Li-ion batteries are manufactured every year, said the team, and understanding what happens when they fail is key to improving their design.
Using a combination of high-speed X-ray tomography, radiography and thermal imaging, Shearing and a team were able to describe how overheating causes gas pockets to form inside the battery, deforming its inner layers.
Overheating can happen due to electrical or mechanical abuse or the presence of an external heat source for example failure of a neighbouring cell in a larger battery pack, said Shearing.
"Depending on the cell design, there are a range of critical temperatures which, when reached, will trigger further exothermic events, which also generate heat," he told AFP by email.
"Once the rate of heat generation exceeds the rate of heat dissipation into the environment, the temperature of the cell starts to rise, thereafter a sequence of detrimental events propagates in a process known as thermal runaway."
For the latest tech news and reviews, follow Gadgets 360 on X, Facebook, WhatsApp, Threads and Google News. For the latest videos on gadgets and tech, subscribe to our YouTube channel. If you want to know everything about top influencers, follow our in-house Who'sThat360 on Instagram and YouTube.