Everything in the nature is the composition of  Hydrogen Carbon and Oxygen (HCO)
as Example - 
Acidic acid - CH3COOH having Hydrogen Carbon and oxygen
Tree - It is also made up of 50% Carbon 42% Oxygen and 6% Hydrogen and 1% other elements(Nitrogen,Magnesium etc). in fact We human are also a composition of Hydrogen carbon and Oxygen
                             
so When these material burn their composition tends to break and gases like Hydrogen Oxygen  and Nitrogen emit in the form of smoke.