The Master Cylinder

Here is where you'll find the master cylinder:

Master cylinder location.  See more brake pictures.

In the figure below, the plastic tank you see is the brake-fluid reservoir, the master cylinder's brake-fluid source. The electrical connection is a sensor that triggers a warning light when the brake fluid gets low.

The master cylinder, reservoir and sensor

As you'll see here, there are two pistons and two springs inside the cylinder.

Diagram of master cylinder

The Master Cylinder in Action
When you press the brake pedal, it pushes on the primary piston through a linkage. Pressure builds in the cylinder and lines as the brake pedal is depressed further. The pressure between the primary and secondary piston forces the secondary piston to compress the fluid in its circuit. If the brakes are operating properly, the pressure will be the same in both circuits.

If there is a leak in one of the circuits, that circuit will not be able to maintain pressure. Here you can see what happens when one of the circuits develops a leak.

Master cylinder with leak

When the first circuit leaks, the pressure between the primary and secondary cylinders is lost. This causes the primary cylinder to contact the secondary cylinder. Now the master cylinder behaves as if it has only one piston. The second circuit will function normally, but you can see from the animation that the driver will have to press the pedal further to activate it. Since only two wheels have pressure, the braking power will be severely reduced.