Yes the previous posters are right. To further clarify, a diode is not a short circuit but a threshold device, it starts conducting whenever voltage across it (when oriented properly to conduct) is greater than some value, typically 0.6V (but may differ for special types).
So it behaves like this whenever the voltage is lower than 0.6 V no current will flow and when the voltage is over this threshold current flows.
The inductor responds to sudden changes in current in a different way, it exhibits something called impedance, that is a way to say that while it has a resistance R it also has an inductance L, a component that is directly dependent on frequency.
So an inductor when suddenly connected or disconnected from a voltage supply reacts by spiking up voltage for a brief while and the current is initially almost zero, only to settle a brief moment later with smaller currents and voltages approaching zero.
The diode in the circuit sees this increase in voltage (while the current is still almost zero in the coil) and it closes, letting the spike flow through it, reducing also the excessive voltage on the coil and thus the large current in the diode that flows for a very short time.
A very common arrangement usually called a SNUBBER is what you will find in some switching relays or even solid state devices. Its function is to stop the excessive voltage spike from breaking coil insulation by conducting temporarily the large voltage spike and then to close as the voltage on the coil returns close to zero. I merely translated the above equations and observations in layman terms, hope it helps.