Flames melt the wax which is a physical change. The wax goes from solid to a liquid but it is still wax just going in different forms when it cools. When wax burns the wax combines with oxygen to form CO2, Carbon Monoxide, Carbon particles, (incomplete burning/oxidation) and water. The burning has broken the bonds in the wax and made a new compound.