Corrosion is defined as the destructive and unintentional degradation of a material caused by its environment.
Unfortunately for metals almost all environments can cause corrosion to some degree, since the corroded state is the more stable state.
For the electrons that are formed at the anode to move to the cathode there must be a path that they can follow. This usually means a physical contact between the anode and the cathode.
A common type of corrosion is known as galvanic corrosion. Galvanic corrosion occurs when two different metals are connected in an electrolyte and one metal corrodes in protection of the other.