When you light a candle, the heat of the flame melts the wax near the wick. This melted or liquid wax is then drawn up into the wick by capillary action. The flame’s heat vaporizes the liquid wax to produce water vapour and carbon dioxide (the same bi-products that humans produce when exhaling).