In most switching regulators you come across two components , Inductor and Capacitor the LC circuit form a second order filter to filter out high switching frequency noise .
The switching function of the switch can be explained as follows.
when a switch is closed ,
a voltage differential exists on the inductor and a current rises given by the equation V=-L*dIL/dt
a portion of which flows through the load and a portion flows through the output capacitor given by the equation Ic = C*dVc/dt
this gives rise to an energy inside the inductor which stores energy during conduction.
when the switch is opened ,
the sudden change in current in the inductor changes the polarity of the voltage w.r.t to the input supply and the output capacitor making a diode in the buck converter freewheel or a boost converter to conduct this charges the capacitor to and energy possessed by the inductor.
So it is not just the voltage , current will also play an important role in a switching converter.
Current never is in a steady state in a switching converter but a small ripple current is needed to make use of the Inductor and Capacitor to regulate.
A small ripple Voltage will always be present on the output .