As you pull the handbrake lever, a fine screw thread on the arm that sticks out of the brake caliper causes the piston to move out a fraction, without turning. It has a ratchet mechanism to prevent it moving back. This is why the caliper piston has to be rotated as it is pushed back in. Hydraulic fluid is sealed at the back of the piston so that you have normal braking as well as the mechanical handbrake. Adjustment is usually automatic, but its different on some Mazda's.