What happens if I interchange the position of the inductor and capacitor in this circuit?
Since the inductor is always connected to the positive supply, shouldn't it charge even when the MOSFET is off? (or) When specifically does the inductor discharge, and why?


Suppose for the moment that the converter is functioning correctly; then C1 has \$V_{\text{OUT}}\$ across it, which is greater than \$V_{\text{IN}}\$. Therefore, the voltage difference between the terminals of L1 is opposite of the direction of the current. This voltage opposes the flow of current. Therefore L1 is discharging (current is decreasing); it is giving up stored energy to force the current to continue in that direction.


  What would if I interchange the position of the inductor and capacitor in this circuit? Considering they are both storage elements, there shouldn't be a change right?


They both have the property of storing energy but that doesn't mean they interact with the circuit in the same way. If you replace L1 with a capacitor, then the DC input cannot flow through it; it becomes charged to the input voltage and nothing happens after that.


  In general, what usually happens when an inductor and capacitor are interchanged?


In general? You'll get a non-working circuit.

If you interchange inductors and capacitors specifically in an RLC network (a circuit composed only of resistors, inductors, and capacitors) you might see a reversal of its frequency response (for example, a low-pass filter becomes a high-pass filter and vice versa).

In fact, if we "squint" and delete some elements from this circuit, it looks like a low-pass filter:







simulate this circuit &ndash; Schematic created using CircuitLab

There's a reason for this: low-pass filtering is precisely what we want to get a stable DC voltage. If you use just this circuit, you'll remove ripple, but you won't get a higher voltage. The additional active components (MOSFET and control circuit) take advantage of the inductor's property of making current flow opposite voltage differences (temporarily) to create higher voltage.

If we swap L1 and C1 then we get a high-pass filter, which is a perfectly reasonable circuit but in this application does nothing, because we want a DC input and a DC output, but a high-pass filter blocks DC.