As a wax candle burns, the wax undergoes a process called combustion. Combustion is a chemical reaction between the wax (hydrocarbons) and oxygen from the air, resulting in the release of heat, light, and various byproducts. The main byproducts of wax combustion are carbon dioxide (CO2) and water vapor (H2O).
When the wax near the flame melts, it is drawn up into the wick through capillary action. The heat of the flame vaporizes the liquid wax, turning it into a gas. This gas mixes with the surrounding oxygen and undergoes combustion, producing carbon dioxide and water vapor as mentioned earlier.
Some of the wax does not completely burn and can form soot, which appears as black particles. These particles can be seen as smoke or can deposit on surfaces near the candle, such as the inside of a jar, as a residue.
In summary, the wax primarily undergoes combustion, converting into carbon dioxide and water vapor. Some of the wax may not fully burn and can form soot, which contributes to the smoke and residue commonly associated with burning candles.