I do not understand how the diode turns on when the switch (transitor) is turned off. Can someone please explain to me. Also, is the output voltage always negative of the input voltage ? I mean inverted.
When the switch is closed, it causes current to flow in the inductor. When the switch opens, the current in the inductor can not change instantly, but begins decreasing which causes a voltage across the inductor given by the above equation. That voltage turns on the diode.
read attached
The decreasing inductor current causes a negative voltage at the top of the inductor which creates a voltage that forward biases the diode on. And yes, I believe the voltage across the output cap can only be negative for ths converter.