First note that there are two inputs to the circuit: Vin and Vswitch.
Vin is the energy source – we will be transferring energy from here to the load.
Vswitch is a control signal used to turn on and off the MOSFET to control how much energy we transfer from Vin.
Assume we start observing the circuit when Vswitch is high and therefore the N-MOSFET is on, allowing Vin to pass through.
In this case, Vx = Vin
Being a buck converter, Vin is larger than Vout, so with the MOSFET on Vx > Vout is also true.
With Vx > Vout, this means that the current through the inductor (left to right) is gradually increasing, which also slowly charges up the voltage on the capacitor.
After some amount of time (e.g., a few microseconds) we force our control voltage Vswitch to go low, which turns off the N-MOSFET.
Because of the fact that the current through an inductor cannot change instantaneously, when the MOSFET turns off then the current through the inductor will take the path of least resistance which is through the diode.
This means that Vx will be approximately 0 V.
In practice, Vx will actually be a slightly negative voltage (GND – VF,diode), but for this explanation we will assume it is 0 V.
Using a diode in this manner is so common in circuits that there is a special name for it: a "freewheeling" diode.
With Vx = 0, or in other words Vx < Vout, this means that the current through the inductor (left to right) is gradually decreasing.
At some point the current through the inductor will be less than the current needed by the load Rload, and so current will start to come from the capacitor. When this occurs, the voltage across the capacitor will start to decrease gradually.
After a few more microseconds we force our control voltage Vswitch to go high again, turning the N-MOSFET back on, and the cycle that we’ve just observed starts all over.