[Background]:
The voltage across inductor is proportional to current change (V=L.di/dt). When the switch is suddenly opened, the vaue of di/dt is very high and so the voltage. This is unwanted and can damage the circuit, so we must consider some switching protection techniques.
[Left]: Diode Protection
Diode is used to bypass the current when circuit suddenly opened. But the respon is relatively slow and the diode must be able to handle the intial current.
[Right]: RC snubber
Faster response and suitable for AC driven circuits.
[Theory Reference]
Paul Horowitz, "The Art of Electronics, 3rd ed." (Chapter 1.6.7)
NB: I am not professional in electrical engineering. So, please correct me if I wrong and tell me if you know another Switching Protection Circuit.