LC Low Pass FIlter in Buck Converter
Assuming ideal components, if you did not have the loop and capacitor, you would get square wave.

Let us consider the simple case: 50% duty cycle, 10V. This is mathematically equivalent to


5V DC +
4/pi * sin(2pi*f*t) +
4/pi * sin(6pi*f*t)/3 +
4/pi * sin(10pi*f*t)/5 + 
etc.


As you see, everything except the DC is not DC*, so if you put a lowpass filter on that signal, you get out 5V DC

To rephrase: You said that you know the capacitor is to maintain same voltage and the loop is to maintain same current - well that's what a DC lowpass filter does.

*I know, that sentence was written by Captain Obvious.

EDIT: If anybody wants to edit for layout, feel free.