How do the brakes work?

How do the brakes work?

Do you know why the brake pedal becomes very hard when you turn off the car engine? It is one of the first surprises that leave you dumbfounded when you are towing the car, but also the advantage that still pushes the Manufacturers to install the hydraulic braking...