Current spikes when MOSFET turns on and voltage spikes when MOSFET turns off
Parasitic capacitance in the MOSFET between drain and source plus external parasitic capacitances mean that when the MOSFET turns on, it is trying to short out these previously charged parasitics and hence, there is always an impulse of current into the MOSFETs drain. Same applies with IGBTs and regular BJTs except internal parasitic device capacitance is usually smaller.

In other words; what do you get when you short a capacitor?


When you turn off a MOSFET, IGBT or BJT, the current that was previously flowing will cause a back emf due to parasitic and/or load inductance. There may be a catch diode (as per the diagrams in the question) but the drain/collector will rise above the supply voltage by one diode drop.

In other words, what happens when you break current in an inductor?