A capacitor is two metal plates facing each other. The space between them is an insulator, so no electron can cross it. Connect a battery all the same, and a current really does flow in the circuit.
It flows because electrons are drawn out of one plate into the wire while the same number are pushed onto the other. Not one electron has crossed the gap, yet there is a current along the wires. That is why the dots in the figure fade out just before the gap.
The result is on one plate and an equal on the other. The charge collected and the voltage across the plates are proportional, and the constant of proportionality is the capacitance : .
Write for the electromotive force of the battery, for the resistance and for the voltage already across the capacitor. What is left for the resistor is , so by Ohm law the current is .
At the start , so the current is at its largest value . As charge collects and rises, the difference shrinks and the current thins out.
A higher voltage means less current, and less current means the voltage rises more slowly. That loop is what makes the exponential curve: .
Resistance times capacitance, , comes out in seconds. It is called the time constant, and it is the one number that says how fast this circuit charges.
At the voltage has reached of its final value, that is 63.2 %. At it is about 99.3 %, and in practice charging is treated as finished there.
A larger resistance throttles the current; a larger capacitance increases the charge that has to be collected in the first place. Both slow the charging, which is why the time constant is the product of the two. Neither one alone settles the speed.
Take the charged capacitor off the battery and close the loop through the resistor alone, and the stored charge runs back out. The electrons that were pushed onto one plate return to the plate they came from.
The only thing driving the circuit now is the capacitor voltage itself, so the current is . The sign is negative because the direction is the reverse of charging.
The voltage falls as . The time constant is exactly the same as before, and at the voltage is down to 36.8 % of where it started. Going up or coming down, the same two values set the pace.