At the second, it is opened to de-energise the relay. When the switch is closed, voltage is immediately applied to the coil. So it is with the coil, current builds up relatively slowly, until eventually it has risen to the steady state value defined by the voltage and the coil's resistance. When the switch is opened, current simply cannot keep flowing. But the inductance of the coil says that it must .
Inductance makes it impossible to stop current immediately.
This voltage spike will cause ann arc across the switch. It will also cause energy to be radiated as electromagnetic noise - a radio interference spike. The energy is in Joules and, for something like an industrial mains contactor - it can be quite significant. We now have a coil full of stored inductive energy in series with a diode and it own series resistance. The drawing below shows the corresponding waveforms.