For children of a certain age, there are few things more amazing than blowing out a birthday candle only to have it relight—as if by magic!—soon after the flame has been extinguished. Gasps, laughter, and more attempts to blow out the candle are soon followed by a responsible adult saying, "Alright, time to put these under water before we burn the house down."
But hold on a minute, you stodgy old Scrooge. Where's your sense of wonder? How can you explain what just happened?
Well, a normal candle has a flammable wick< traditionally made of braided cotton or a similar material. Once extinguished, it leaves behind an ember that dies out. This ember is still hot enough to melt wax, which is why a plume of smoke arises—this is called "paraffin vapor." The molten wax hardens, the vapor dissipates, and the candle returns to its boring old state.
Trick candles, however, have flakes of magnesium (or similar metals) in their wicks. Magnesium has a relatively low autoignition point of around 800° Fahrenheit and is hard to extinguish when in flake or powder form. The ember is hot enough to get these flakes going, and they eventually spark and create the energy needed to ignite the paraffin vapor as before. Ha ha! Your wish didn't come true, lil' bud. Better luck next year!
Wicks embedded with magnesium were used for years in things like dynamite and by adventurers and hunters faced with inhospitable conditions. Nowadays, you are also likely to find them atop your nephew's birthday cake. Unless he is Canadian. Trick candles are banned in Canada.