This is a circuit design for a typical wall-plug power adapter.
The sinusoidal source represents a typical US 60 Hz, 120V AC wall supply.
A transformer steps the voltage down to a manageable range to be rectified for a 5V DC supply, but the waveform is still sinusoidal.
The 4 diode bridge rectifier takes this lower amplitude sinusoidal signal and produces a DC biased result, but still with noise resulting from the rectification process.
The capacitor before the voltage regulator chip helps smooth some of this noise. Then the regulator chip provides a self-contained, feedback controlled mechanism to keep the output voltage at the specified value.
The output capacitor further smooths any output ripple and provides a reservoir of charge to supply any surge in current load that may be encountered.
This example includes a load resistor that allows the exploration of the effects of load. The load is varied during the simulation and it can be seen that above a load of 100 mA, the regulation of the output voltage begins to deteriorate.
The addition of a few components can make it possible for such a circuit to provide significantly higher power loads. See http://www.systemvision.com/design/ac-dc-power-adapter-current-boost-reg... for an example.