Relays and Contactors
Flyback or snubber diodes are simple ways of protecting electronic circuits from spikes.
As the magnetic field of a relay coil collapses when the coil is de-energized, a high voltage spike can occur. The diode prevents the electronics that are connected to the coil from absorbing the spike. But if you connect them backwards, you can end up with a short circuit.