Before you attach the 9V battery, all points in the circuit are at ground (0V). To understand how the voltage regulator circuit works, first consider how it operates without the capacitor.
With the switch in the off position, a voltage is put on the Zener diode through R14.
(A Zener diode is a unique type of diode that allows the current to flow forward the same way as an ideal diode, but can also allow it to flow in reverse when the voltage is higher than a certain value known as the breakdown voltage. It was named after the physicist who discovered this phenomenon, Clarence Zener. The device is commonly used to provide a reference point for voltage regulators, or to protect other semiconductors from momentary voltage pulses).
R14 is used so the Zener diode will be in the reverse breakdown mode. As a result, the voltage will be held at a constant 5.6V all across the diode. The 5.6V in this example is also maintained along the transistor and load reistor base emitter junction in the series. Because the voltage is greater than 0.7V, the diode at the base emitter is biased towards the front and the current flows into the base of the transistor.
This means that as long as the Zener diode is in reverse mode and the base emitter is biased to the front, the voltage across the resistor will be fixed at 5.6 – 0.7 = 4.9V.
To understand how the circuit is able to always hold the voltage around a constant 5V, consider the flow of the current in the circuit. As the current flows through R14, it splits between the base emitter diode and the Zener diode.
If Ib is the current flowing into the the base, a current equal to ßIb will flow from the battery into the collector. Because the transistor is set to function in the forward mode, a current equal to (ß + 1)Ib will flow out of the emitter and pass through the load resistor.
If there is a change in the load resistor, then the current flowing through the Zener diode will change as well, so that the base current and the emitter current can maintain the correct value to put out the required 5 V all across the load resistor.
Since the capacitor is the component in the circuit capable of storing the electrical charge, it is used in this example to help maintain the output of the voltage regulator at a constant rate over time.
The voltage change rate across a capacitor is proportionate to the amount of current flowing from it, divided by the amount of electricity it is able to store. Therefore, the bigger the capacitor, the less of a voltage output change there will be over time for a fixed current drain.