What are some examples of capacitors used in circuits?
They are used to store energy and then release it when needed.
Case 1: Camera flash
A camera flash requires a lot of energy in a short space of time in order to produce a bright enough flash. A battery does not have sufficient power to produce a bright enough flash. An array of capacitors can store enough energy and release it very quickly across the bulb filament.
Case 2: Computer emergency shutdown
If a computer loses power it will not be able to shutdown safely. But a capacitor array can be used to provide enough time to save critical files and limit the damage from a power loss. The capacitors charge automatically when the computer is powered on. If the computer loses power the capacitors will automatically discharge through the circuitry thereby providing a short time in which the computer can save critical files etc.
Case 3: AC to DC conversion
This is not strictly an energy storage facility. The key part of AC to DC conversion is a rectifier. The problem with the output from a rectifier is that it is not smooth (it has the peaks of the sinusoidal AC signal). Capacitors in the circuit can be charged at the peaks and then discharge during the gaps which smooths the signal. In terms of energy storage the capacitors take some of the energy from the peak and release it during the gap so that the output energy is roughly constant.
The other answer is fine, but it perhaps leaves out the most common cases, decoupling and coupling capacitors.
Most capacitors in a device like a cellphone are decoupling capacitors, also known as bypass capacitors. The chips are essentially switches, so turn on and off various currents. If we think of how the lights dim for a second when the air conditioning goes on or when Dr. Frankenstein throws the switch, we can see how a sudden current draw can lower the voltage to other devices sharing that power line.
Digital logic chips and others can't do what they're supposed to if their power line voltage goes below a certain level. So next to the power pin(s) of each chip is a decoupling capacitor, maybe two or three. The idea is when another chip draws a lot of current lowering the voltage, the coupling capacitor is there to provide power to its local chip. That is, it's there to decouple the power to the local chip from the power to the others.
It's fun to play hot air Jenga with electronics and see how many components can be removed and still have the thing work. A good strategy is to start with the bypass caps; all or almost all can generally be removed with no ill effect.
Another use of capacitors is as coupling capacitors. The idea here is to remove any DC component of a signal before passing it on the the next stage. Typically a signal, say for an amplifier, goes into the base of a transistor, which needs the correct DC bias to work. Additional DC from the signal will shift this bias, causing problems. Capacitors conduct AC but not DC, so are perfect for removing any DC.