Have you ever noticed how you have less candle after burning than before? This is because the wax oxidizes (burns) in the flame to yield water and carbon dioxide, which dissipate in the air around the candle, in a reaction which also yields light and heat. Candle wax (paraffin) is composed of chains of connected carbon atoms surrounded by hydrogen atoms. These hydrocarbon molecules can burn completely.
First the heat of the flame vaporizes the wax molecules and then they react with the oxygen in the air. As long as the wax doesn't melt away from the flame, the flame will consume it completely and leave no ash or wax residue.