The brake system of a vehicle also work by obeying Pascal principal
A force is applied on a brake pedal exert pressure on a master cylinder
The pressure at the master cylinder producer force that make the piston of slave cylinder to open the brake shoe and make the brake lining to press on the drum they will resist
The return spring pull back the brake shoe and pull the slave cylinder back
As easy as that my friend