$$C_{16}H_{32} + 23O_2 \rightarrow 16CO_2 + 18H_2O$$
This equation shows that when a candle burns, the wax (C16H32) reacts with oxygen (O2) to produce carbon dioxide (CO2) and water (H2O).