Modern brakes were invented in the late 19th century, around the same time as the tyre. Up until then, vehicles had wooden wheels that were stopped by large wooden blocks, lowered into position by the driver using a simple lever system. When tyres were invented, the wooden block system wasnt good enough to stop them at the higher speeds they could achieve, which meant that a new braking system had to be invented.
To see the basic principles of modern braking, it is easiest to look at a bicycle. Basically, when you put pressure on the brakes, the pressure is transferred through cables to pull small pads onto the side of the tyres, and the force of the friction against the tyres causes them to stop.
In fact, cars originally used this very same cable system, but it was found not to work so well at high speeds. Instead, the cables were replaced with hydraulic fluid, which works to transfer the pressure the driver puts on the pedal to the brakes. This works because the fluid cannot get much smaller when pressure is put on it, meaning that pressure at one end is transferred to the other much like water flowing through a pipe. However, if this brake fluid leaks even a...