If you were to plot the current through an inductor vs time, it will be continuous, in the sense that it can't make a sudden jump. So if you choose an instant of time, and moved along the graph, the value at that instant, will be the same, as you approach from either side of that point. The voltage across a capacitor also must be continuous.
But for that to be true, an inductor will automatically change the voltage across itself, to keep the current flow the same. So the plot of the voltage, can have a jump, at a point in time, like from +12V the moment before the sw is opened, and then jump/step to -12V the moment after the switch opens. And so then the current just before and after, maintains the same magnitude and direction, but then it will decay as the magnetic field loses energy to external resistance or internal non-ideal effects, like the coil's resistance.
And an ideal capacitor, in order to have a continuous voltage, it's current can jump to any value it needs, to maintain the voltage the same, at an instant in time.
If you pass a big current through some inductor, and then open the sw, the voltage builds up to the point that some leakage or even air itself, will conduct for a moment, and be seen as a spark. And then make radio waves too.