When "S" is closed, the inductor is charged with energy. When S opens that energy is forced into the capacitor. This charges the capacitor up a bit and its terminal voltage rises. When S closes again, the capacitor is slightly discharged by the resistor.
The important thing to note here is that the amount by which the capacitor increases in voltage MUST be a bit more than the amount of voltage that is reduced by the discharging effect of R on C.
Eventually, the capacitor becomes charged to the "required" voltage. From this point in time the sole purpose of the energy transfer system is to keep feeding enough energy to the capacitor to increase the voltage by the same amount that the resistor discharges that voltage.
This keeps the average output voltage fixed. To do this effectively the simple circuit you show in your question MUST be controlled by another circuit that alters the mark space ratio of the switch opening and closing. This is the fundamentally important part of a boost regulator.
If you kept the mark space ratio constant the capacitor would keep charging to a really high voltage. The controller is therefore important to act as a regulator.