The whole setup works on Pascal's law that a pressure applied on any point of an incompressible fluid is equally distributed to all points.
When we apply the brake, pressure is applied in a pipe near the top of the master cylinder, transmitted and eventually reached the caliper, which pushes the piston, which in turn pushes the gasket against the disc.
Once the pedal is released, the pressure is reduced to its initial value, the pressure on the piston is reduced, and the piston leaves the brake pedal and disengages from the brake.


