In chemical reactions, "oxidation" is loosely defined as when a molecule, atom or ion loses an electron. "Reduction" is when a molecule, atom or ion gains an electron.
1. 2Na + Cl2
→
2. 2Na+ + 2e- + Cl2
→
3. 2Na+ + 2Cl-
→
4. 2NaCl
You can't have electrons just floating around at loose ends (it just isn't done!) and so "oxidation" and "reduction" always happen together and when they do, the resulting chemical reaction is called an "oxidation-reduction" reaction ("redox reactions" for short).
The reaction on the right is the oxidation-reduction reaction that forms sodium chloride (NaCl) - the main ingredient (as in almost 100%) of table salt.
It has been broken down into two "half-reactions" so you can see how (in oxidation) the electrons (e-) leave sodium (Na) and (in reduction) are picked-up by chloride (Cl).
Note (step 3.) that the loss of electrons gives sodium a positive charge (Na+) and gaining electrons gives chloride a negative charge (Cl-). Since the sodium and chloride no longer have neutral charges, they are now defined as "ions".
Because opposite charges attract, the positive sodium ions (2Na+) are attracted to the negative chloride ions (2Cl-) and so an ionic bond forms between them, making sodium chloride (NaCl) molecules. [An "ionic bond" is a chemical bond formed by the attraction between oppositely-charged ions]
Things are actually a bit more complicated because you can have "reduction" and "oxidation" even if no electrons are actually transferred.
Basically, you've been "oxidized" as long as you have less control over electrons than you did prior to the chemical reaction and you've been "reduced" as long as you have more control over electrons than you did before the chemical reaction occured. (1)
So, even reactions that break and form covalent bonds (bonds where atoms share electrons instead of completely losing and gaining electrons), can qualify as "oxidation-reduction reactions". All that is needed is that someone has lost some control over their electrons and someone else has gained some control over their electrons.
Let's take the burning of methane in oxygen as an example of an oxidation-reduction reaction that breaks and forms covalent bonds. The chemical equation is:
In methane (CH4), carbon (C) and hydrogen (H) share the electrons in their covalent bonds pretty equally. Also, two oxygen (O) atoms covalently bonded together to form oxygen molecules (O2) share their electrons equally.
However, oxygen attracts electrons much more strongly than either carbon or hydrogen and so if you burn methane in oxygen (O2) to form carbon dioxide (CO2) and water (H2O), the electrons in the covalent bonds in the carbon dioxide (CO2) and the water (H2O) molecules belong much more to the oxygen (O) atoms than to the carbon (C) and hydrogen (H) atoms.
For this reason, we consider the hydrogen and carbon atoms to have been "oxidized" (they've lost control over electrons) and the oxygen atoms to have been "reduced" (they've gained control over electrons). (2)
To make things a little more confusing for beginning chemistry students, the substance that is "oxidized" is called the "reducing agent" because it has given up the electron(s) that the "reduced" substance needed in order to be "reduced". Similarly, the "reduced" substance is called the "oxidizing agent".
1 "Oxidation-Reduction" reactions are more strictly defined as taking place whenever the oxidation numbers of
the involved substances have changed. According to the IUPC Gold Book (http://goldbook.iupac.org),
oxidation number is: Of a central atom in a coordination entity, the charge it would bear if all
the ligands were removed along with the electron pairs that were shared with the central atom.
[oxidation number]
The idea to explain oxidation-reduction reactions in terms of how evenly the electrons in a bond are shared
came from the textbook Biology by Neil A. Campell and Jane B. Reece, copyright 2002 by Pearson, Education, Inc.
Specifically, the book's treatment of redox reactions on pages 156 through 158 (Chapter 9: "Cellular Respiration"). The example of burning methane is also in
this section of the book.
2 This example of methane combustion as an oxidation-reduction reaction also came from the pages in the textbook Biology listed in footnote #1.