Combustion is an example of a type of reaction called oxidation. In an oxidation reaction, a substance gains oxygen. Metals and non-metals can take part in oxidation reactions.
Metals react with oxygen in the air to produce metal oxides. For example, magnesium reacts with oxygen to produce magnesium oxide when it is heated in air:
magnesium + oxygen → magnesium oxide
2Mg + O2 → 2MgO
Non-metals react with oxygen in the air to produce non-metal oxides. Here are two examples for the non-metals carbon and sulfur.
Carbon reacts with oxygen to form carbon dioxide:
carbon + oxygen → carbon dioxide
C + O2 → CO2
Sulfur burns reacts with oxygen to form sulfur dioxide:
sulfur + oxygen → sulfur dioxide
S + O2 → SO2