Capacitors and resistors are the components most frequently used in electric and electronic circuits. Capacitors are used for duplexers, oscillator circuits, as interference suppressors or in the form of electrolytic capacitors filtering of various kinds. Electrolytic capacitors differ from normal capacitors because they use a liquid, an "electrolyte", within their aluminum bodies, conducting electricity when a voltage is applied.
Almost all electronic circuits in power supplies use filter capacitors. These deal with electrical peaks transformers or transistors are unable to handle quickly enough. Broadly speaking, a capacitor doesn't work much different than a rechargeable battery. It will recharge when DC voltage is applied. The capacitor's charge is stored when the voltage source and the capacitor are disconnected. Filtering capacitors equalize voltages, in power adapters, for example.
Transformers will down-transform a power adapter's voltage to the desired level. Rectifiers generate DC voltage from the applied AC voltage. The freshly generated DC voltage is not "smooth", rather it pulsates. The brief voltage drop caused by this pulsation is covered by a capacitor, which functions like an additional voltage source providing a stabilizing amount of voltage. Capacitors with lower Equivalent Series Resistance (ESR) are used to make sure that the stabilization works properly and capacitors are able to cover pulsing without being damaged themselves.