Oxidizing agent: An oxidizing agent is an element that gains electrons. Since the oxidizing agent means to gain electrons; it is said to have been reduced.
The element which undergoes reduction (gets reduced) is called oxidizing agent.
For example: 2Mg + O2→ 2MgO
In the given reaction, O2 is reduced by losing oxygen atoms. Thus, O2 is an oxidizing agent as it undergoes reduction.
Reducing agent: A reducing agent is an element that loses electrons. The reducing agent means to lose electrons; it is said to have been oxidized.
The element which undergoes oxidation (gets oxidized) is called reducing agent.
For example: 4NH3 + 5O2→ 4NO + 6H2O
In the given reaction, nitrogen is oxidized to NO by gaining oxygen atom.
Thus, NH3 is reducing agent as it undergoes oxidation.