As a candle burns, it gives off molecules in the form of gases. Those molecules are in a very excited state, causing a breakdown of the chemical bonds that bind them together. This releases energy which you see as both light and heat from the flame. In other words, the flame is simply a column of very excited gases.