In a chemical reaction, oxidation is the gain of oxygen and reduction is the loss of oxygen. When magnesium burns in air, it gains oxygen to form magnesium oxide, so magnesium is oxidised: 2Mg + O2 → 2MgO.
Oxidation and reduction usually happen together in the same reaction. When hot copper oxide reacts with hydrogen, the copper oxide loses oxygen and is reduced to copper, while the hydrogen gains that oxygen to form water and is oxidised: CuO + H2 → Cu + H2O.
The substance that gives oxygen to another substance is the oxidising agent. It is the one that is reduced. The substance that takes oxygen away is the reducing agent. It is the one that is oxidised. In the copper oxide reaction, copper oxide is the oxidising agent and hydrogen is the reducing agent.