Capacitor
Storing charge - the capacitorTo understand how another component in electronic circuits works, imagine the following:
Imagine that we have two 'boxes' to put charged particles separated by a piece of plastic. We fill the top one with positive charges and the bottom one with negative charges, only the positive charges are allowed to move. We know that they will try to come together because of the forces generated by opposite charges, but since they cannot get out of the box, the are just stored there not doing any work.
Now imagine that we connect the two boxes with a pipe through where the charges can move. The positive charges will move to meet with the negatives and be in equilibrium. Now that they are moving, there's work and energy being expended that can be put to use.
The device that accomplishes this is called a capacitor. Basically they are two conductor plates separated by an insulator layer, in effect creating the two boxes mentioned above.
When we connect a voltage source to a capacitor, the capacitor is 'empty', with no charges, then charges from the source will start filling it up. As more and more charges reach the capacitor, they will start exerting a force on the charges trying to come in from the source, so it will start filling slower and slower.
Once the capacitor is filled, no more charges flow from the source to the capacitor. If the voltage source is removed, the charges the capacitor has remain there, waiting for something to allow them to meet with opposite charges to reach equilibrium.
If we connect a resistor across, the potential difference created by the separated charges in the capacitor allow it to function as a voltage source, so these charges start flowing through the resistor. As more charges flow, the capacitor starts emptying, causing less potential difference over time, until it can no longer provide charges and the current flow stops.
One way to picture the charging and discharging of a capacitor is to think of a balloon with two mouths, one connected to an air pump and the other left open simulating the resistor through which charges escape. The pump will inflate the balloon to a certain pressure that will be kept constant by the air that escapes the balloon through the other mouth.
If a sudden increase in pressure from the pump occurs, the balloon will inflate more but the air coming out will remain at about the same level, increasing until the air that comes in is the same air that comes out. If the increase in pressure is short, the balloon will inflate and deflate quickly, and the air coming out would remain almost the same throughout.
Same happens with capacitors, when a sudden spike in voltage occurs, the capacitor stores the charges and the voltage in it rises slowly, outputting about the same current throughout the process. This property gives capacitors most of its uses with direct current circuits.