Burning is a chemical reaction that involves the outer electrons of the substances. Usually, oxygen is one the elements, and something else that has excess electrons is the other. All chemical elements that aren't stable seek to become stable by the addition or subtraction of electrons. Oxygen needs two electrons to have a stable outer shell, and when it chemically reacts with a more electronegative substance, the result is fire.
The energy to burn originates in the chemical bonds of the substances. If they have a chemical affinity for oxygen, a reaction progresses and this chemical bond energy is released. The combustion products that result are the ashes of the reaction and exist in a more stable state.
Substances are combined in the absence of air to prevent burning, so that the chemical reaction proceeds without the electron-eager oxygen reacting and causing a fire. Stable gases like argon and krypton have stable outer electron shells, so chemical reactions proceed in their presence without burning.
The most fundamental example of burning is actually water. A hydrogen molecule is electronegative with two electrons in its outer shell, which makes it a strong match for oxygen. The chemical reaction proceeds readily and releases heat and light.