Capacitor

A capacitor is a device that holds an electric charge. It consists of two metal plates with an insulating layer that allows an electric charge to build up between the plates. Once the current is stopped, the charge remains and can flow out of the capacitor (called discharging the capacitor) as soon as the charge voltage stored in the capacitor is presented with a new path for the current to take.
Measuring the Capacity of a Capacitor:
The amount of charge that a capacitor can store is measured in farads, and one farad is actually a very large amount. Therefore, you will generally find capacitors with values measured in picofarads or microfarads.
One picofarad (pF) is 0.000000000001 of a farad, and one microfarad (μF) is 0.000001 of a farad. Capacitors are also manufactured to accept certain voltage maximums. In this book, we'll be working with low voltages only, so we won't be using capacitors rated at greater than 10 V or so; it's generally fine, however, to use higher-voltage specification capacitors in lower-voltage circuits. Common voltage ratings are 10, 16, 25, and 50 V.
Charging and Discharging of a capacitor:
When positive and negative charges applied on the capacitor plates, the capacitor becomes charged. A capacitor can retain its electric field -- hold its charge -- because the positive and negative charges on each of the plates attract each other but never reach each other.
At some point the capacitor plates will be so full of charges that they just can't accept any more. There are enough negative charges on one plate that they can repel any others that try to join. This is where the capacitance (farads) of a capacitor comes into play, which tells you the maximum amount of charge the cap can store.
If a path in the circuit is created, which allows the charges to find another path to each other, they'll leave the capacitor, and it will discharge.
For example, in the circuit below, a battery can be used to induce an electric potential across the capacitor. This will cause equal but opposite charges to build up on each of the plates, until they're so full they repel any more current from flowing. An LED placed in series with the cap could provide a path for the current, and the energy stored in the capacitor could be used to briefly illuminate the LED.

Calculating Charge:
A capacitor's capacitance -- how many farads it has -- tells you how much charge it can store. How much charge a capacitor is currently storing depends on the potential difference (voltage) between its plates. This relationship between charge, capacitance, and voltage can be modeled with this equation:

Charge (Q) stored in a capacitor is the product of its capacitance (C) and the voltage (V) applied to it.
The capacitance of a capacitor should always be a constant, known value. So we can adjust voltage to increase or decrease the cap's charge. More voltage means more charge, less voltage...less charge.
That equation also gives us a good way to define the value of one farad. One farad (F) is the capacity to store one unit of energy (coulombs) per every one volt.