The chemistry of light metal fires is interesting. Burning in this sense is combining with Oxygen with release of energy.
Carbon and Hydrogen both burn in Oxygen to produce stable compounds: Carbon Dioxide and Dihydrogen Monoxide (Water). These are difficult to split apart, but it can be done; plants convert CO² into Carbon and Oxygen with sunlight and Water is easily broken apart by electrolysis.
Being pre-burnt and cheap as chips makes Carbon Dioxide and Water good for fighting ordinary fires. They deny the fire oxygen and cool the flame. If enough heat is removed the reaction stops.
Metal fires are a different kettle of fish. Metals like Magnesium and Titanium have a stronger affinity for Oxygen than Carbon and Hydrogen. Get Magnesium hot enough and:
4Mg + CO² → 2MgO + C plus heat, and Carbon is also inflammable.
Fortunately it takes a lot of heat to start the reaction, but very difficult to put out once going. Powder and swarf are easier to ignite than solids. This photo was a factory in the US making Titanium golf club handles:

And this one, a recycler. Note the flying white hot debris caused by hosing water on to burning Titanium. It exploded.

Amateurs get caught out because common-sense says a fire extinguisher will put a small fire out, and although it might, the result could be disastrous. Professional firefighters get caught when they don't know burning metal is involved. Out come the hoses and the explosion catches the unlucky and spreads the fire to adjacent properties. The golf club handle fire destroyed 4 adjacent businesses as well…
Dave