Burning wood in a fire is an example of a combustion reaction. In the combustion reaction, the carbohydrates in wood combine with oxygen to form water and carbon dioxide. This reaction is very energetic, and it generates heat and light as it releases that energy.
True combustion reactions always involve molecular oxygen gas, which is has two bonded oxygen atoms. Most substances that combust are biological in origin and frequently have some combination of carbon, hydrogen and oxygen in their composition, just like wood. However, other non-biological substances can and do undergo combustion. Some metals, such as magnesium, also combust, producing metal oxides.