When the positive pulse from PWM is applied to the transistor Q shown in figure it gets turned on. In this condition current flows through transistor Q and.
Inductor L. Inductor stores the energy. Diode D is reverse biases in mode 2. If the transistor Q is supplied with negative pulse it gets turned off and inductor reverses its polarity. Now diode D is forward biased with negative polarity of inductor.