The elements involved in an electrochemical reaction are characterized by the number of electrons each has. The oxidation state of an ion is the number of electrons it has accepted or donated compared to its neutral state (which is defined as having an oxidation state of 0). If an atom or ion donates an electron in a reaction its oxidation state is increased, if an element accepts an electron its oxidation state is decreased.
For example when sodium reacts with chlorine, sodium donates one electron and gains an oxidation state of +1. Chlorine accepts the electron and gains an oxidation state of -1. The sign of the oxidation state (positive/negative) actually corresponds to the value of each ion's electronic charge. The attraction of the differently charged sodium and chlorine ions is the reason they then ionicly bond to each other.
The loss of electrons of a substance is called oxidation, and the gain of electrons is reduction. This can be easily remembered through the use of mnemonic devices. Two of the most popular are "OIL RIG" (Oxidation Is Loss, Reduction Is Gain) and "LEO says GER" (Lose Electrons: Oxidization, Gain Electrons: Reduction). The substance which loses electrons is also known as the reducing agent, or reductant, and the substance which accepts the electrons is called the oxidizing agent, or oxidant. The oxidizing angent is always being reduced in a reaction; the reducing agent is always being oxidized.
A reaction in which both oxidation and reduction is occurring is called a redox reaction. These are very common; as one substance loses electrons the other substance accepts them. Redox reactions are the basis for ionic bonding.
Oxidation requires an oxidant. Oxygen is an oxidant, but not the only one. Despite the name, an oxidation reaction does not necessarily need to involve oxygen. In fact, even fire can be fed by an oxidant other than oxygen: flourine fires are often unquenchable, as fluorine is an even stronger oxidant (it has a higher electronegativity) than oxygen).
A spontaneous electrochemical reaction can be used to generate an electrical current, in electrochemical cells. This is the basis of all batteries and fuel cells. For example, gaseous oxygen (O2) and hydrogen (H2) can be combined in a fuel cell to form water and energy (a combination of heat and current, typically).
Conversely, non-spontaneous electrochemical reactions can be driven forward by the application of a current at sufficient voltage. The electrolysis of water into gaseous oxygen and hydrogen is a typical example.