An oxidizing agent (often referred to as an oxidizer or an oxidant) is a chemical species that tends to oxidize other substances, i.e. cause an increase in the oxidation state of the substance by making it lose electrons.
They are chemical substances that oxidizes another substance by removing the electrons.
In the reaction
Chlorine acts an oxidizing agent, as it accepts the electrons from sodium and gets reduced.
The oxidation state of sodium in is but in , the oxidation state of changes to so is getting oxidized as it loses its electrons.
Also, the oxidation state of chlorine in is but in , the oxidation state of changes to so is getting reduced as it accepts the electrons.
Hence, chlorine acts as an oxidizing agent by removing electrons from sodium.