Batteries are bombs in disguise because a battery contains a lot of combustable and reactive material as the electrodes are submerged in a liquid called an electrolyte, which allows for the movement of ions and consists of lithium salt and organic solvents. There is about 12kg of highly flammable lithium in a 75kwh battery and 9 Litres of solvent based electrolyte: It is these organic solvents which are the leading fire hazard in Li-ion batteries. Furthermore, the positively charged electrode (cathode) in the battery contains oxygen, which may be released if the battery is subjected to specific stresses, e.g., internal short, excessive heat, and more. This means that the Li-ion batteries have all the elements needed to self-sustain a fire.
In a powerful thermal incident, the Li-ion battery may release some of the flammable electrolyte along with various flammable/toxic gases such as hydrogen (H2), methane (CH4), carbon monoxide (CO) and hydrofluoric acid (HF). The amount and rate of the gas released depend on different parameters that are related to battery chemistry and the amount of electrical energy stored. A release of these flammable gases is what can cause fires and explosions.
As has been said the best thing to do with a burning battery is to retire and watch from. a safe distance.....