The coil of a relay is basically an inductor. When the relay is switched off, the inductive coil will generate a large negative voltage to try and keep the current flowing (remember: inductors “resist” the change in current). This is called inductive kickback. This voltage spike can cause havoc in neighbouring components (e.g. killing the transistor used to switch the relay on, or arcing across switch terminals) if not suppressed.
The solution? Add a Zener diode in series with the general purpose diode to increase the voltage drop when the coil is turning off. This causes the magnetic field to collapse faster (closer to an open-circuit), but still provides circuit protection. Choose a Zener voltage so that the Zener voltage plus forward diode drop does not exceed the maximum voltage of the switching element (or other circuitry).
On the right is a unprotected relay coil, on the left a protected one.
Activate the relays with the 2 SPST switches and wait for the current ranges to become near 0. Switch off each relay coil and notice the difference in the inductive kickback.