A battery can catch fire due to an internal short circuit. When a short circuit occurs, it causes overheating of the cells within a battery, which can ultimately lead to a condition known as “thermal runaway”, which doesn’t typically confine itself to just one cell. Increasing pressure and temperature within a cell can cause it to explode and vent its contents. This can lead to neighboring cells going into thermal runaway as well.
Lithium fires are unique in that they are not typically extinguished in the same manner as ordinary combustible fires. Depending on the type of battery, non-traditional extinguishing agents, such as halotron or copper powder, may be needed. A lithium metal fire is treated differently from a lithium-ion fire in that each requires different firefighting agents.
See more information at via How Lithium Batteries Become a Workplace Hazard – Lion Technology.