That's the usual case (and where the term "oxidation" comes from). But oxidizers don't need to release oxygen. Here is a simple counter example:
##2Na + Cl_2 \to 2NaCl##
This is a redox reaction without any oxygen. The oxidizer chlorine is reduced from Cl
2 to Cl
- (it accepts an electron) and the reducting agent sodium is oxidised from Na to Na
+ (it releases an electron).
Now you might ask how to see if a reaction is a redox reaction or not. There is a property called
"oxidation state". You can assign an oxidation state to every atom of a compound by applying the corresponding rule set. It is increased by oxidation and decreased by reduction. In a redox reaction you have both, increasing and decreasing oxidation states. Compounds, groups or single atoms (depending how deep you want to brake it down) with decreasing oxidation states are the oxidizers and reduction agents are characterized by increasing oxidation states.
In the example above it is clear. The oxidation state of Na increases from ±0 to +1 and the oxidation state of Cl decreases from ±0 to -1. But it can be complicate. Let's take two possible decomposition reactions of ammonium nitrate with the oxidation states above the atoms:
(1) ##\mathop N\limits^{ - 3} \mathop {H_4 }\limits^{ + 1} \mathop N\limits^{ + 5} \mathop {O_3 }\limits^{ - 2} \to \mathop N\limits^{ - 3} \mathop {H_3 }\limits^{ + 1} + \mathop H\limits^{ + 1} \mathop N\limits^{ + 5} \mathop {O_3 }\limits^{ - 2}##
(2) ##\mathop {2N}\limits^{ - 3} \mathop {H_4 }\limits^{ + 1} \mathop N\limits^{ + 5} \mathop {O_3 }\limits^{ - 2} \to 2\mathop {N_2 }\limits^{ \pm 0} + \mathop {O_2 }\limits^{ \pm 0} + 4\mathop {H_2 }\limits^{ + 1} \mathop O\limits^{ - 2}##
The first example is no redox reaction because the oxidation states of all atoms remain unchanged. The second example is a redox reaction because the oxidation states of nitrogen change. But ammonium nitrate is both, oxidizing and reducing agent. You need to brake it down to the atoms to see what is reduced and what is oxidized:
The nitrogen of the ammonium ion NH
4+ is oxidized from -3 to ±0,
the nitrogen of the nitrate ion NO
3- is reduces from +5 to ±0 and
one oxygen atom is oxidized from -2 to ±0.
That's what most likely happened during the Beirut explosion (with additional equilibrium reactions between nitrogen and oxygen to a mixture of nitrogen oxides).
The electrons actually have something to do with it. Shifting electrons away from oxygen and one of the nitrogen atoms and toward the other nitrogen atom is what the reaction makes a redox reaction and redox reactions usually (but not always) have a high reaction heat. Ammonium nitrate being both, oxidizer and reducer at once is another important factor because both parts of the reaction are always available at the same place. The third factor has also been mentioned above: The reaction produces a lot of gas that expands due to the reaction heat. That's what the destruction finally comes from.