It seems to me that many people don't understand the cause of the spark exhibited when a relay contact opens after supplying power to a coil. So I thought I'd explain it.
A coil is a winding of conductive metal, usually insulated copper around a former, the former can be any material often its purpose is to give the coil shape, most of the time it is used to increase or more accurately concentrate the magnetic lines of flux produced by the coil.
When you apply a voltage across a coils windings, such that current flows through the coil, a magnetic field develops around the coil. It is maintained for as long as current flows.
When you break the current flow, the magnetic field starts to collapse. As it collapses a voltage develops across the coil. That voltage is in the opposite direction of the original voltage. This is the famed back EMF or back Electromotive Force.
The speed at which the field collapses controls the voltage developed across the coil. The faster the collapse the higher the voltage.
When you interrupt the current flow into the coil using an unprotected relay/reed switch a visible spark jumps across the contacts. This spark is caused by exactly the same mechanism used to create the spark in a cars engine. Its the back EMF of the coil creating that spark. It is not some sort of battery effect from the contacts as I read once. In a car you have the ignition coil. its just a fancy coil designed to harness back EMF.
As soon as a gap appears between the contacts of the relay, current stops flowing into the coil. The magnetic field immediately starts to collapse. Because there is no load on the coil (current can't flow as the relay is open – just) the magnetic field collapses very fast. This as stated before creates a higher voltage, as long as no current flows this voltage increases, until a point where the voltage across the relay contacts reaches high enough to ionize the air in the tiny gap between the contacts, creating a plasma. Current starts to flow through the plasma and we see that as a spark.
As the contacts continue to open the plasma grows between the contacts and current continues to flow until finally the magnetic field in the coil collapses to the point no more current can flow and the spark disappears.
While this current is arcing across your contacts in a little light display it is also destroying them. That's why if you look at the contacts after a few uses they are pitted and burnt. It takes energy to do that and the energy is supplied by the collapsing magnetic field.
When designing a circuit which uses an inductor (coil) one must take into account this problem and design around it. the easiest way to solve it is to place a small capacitor across the contacts. What that does is gives the current an alternate path to flow while the contacts are opening. Eventually the contacts are open wide enough to prevent the plasma developing and therefore prevent the spark occurring. The capacitor must be big enough to absorb the energy from the coil without failing which means it must deal with very high voltages or lots of current. Also the coil itself must be capable of dealing with those high voltages or the insulation will break down and your coil will short out.
And because of relay spark the entire circuit may not be damaged but function of circuit will damage.