There are magnesium crystals in the wick that spark as they burn. These sparks ignite the smoke and hey-presto a candle flame re-appears.

Wade.