how or where does the hat energy produced by the candle come from ?? help me!

From the combustion of the wax(oil). If we use CxHy for the wax (a hydrocarbon), then

CxHy + O2 ==> CO2 + H2O
This is an exotheric reaction.