The primary advantage of a switching regulator is very high efficiency, a lot less heat and smaller size.
The switching regulator is really nothing more than just a simple switch. This switch goes on and off at a fixed rate usually between 50Khz to 100Khz as set by the circuit.
The time that the switch remains closed during each switch cycle is varied to maintain a constant output voltage. Notice that the primary filter capacitor is on the output of the regulator and not the input.