How does a handbrake work?
You manually pull a lever either on the floor or under the dash of the car, this in turn pulls a cable which pulls the brake pads/shoes onto the disc/drum and holds there until you manually release the lever. It holds the vehicle stationary while you are not there. Some vehicles have a foot operated hand brake/parking brake, they are operated by you foot but work in a similar way. Electric hand brakes are usually push button but instead of a cable an electric solenoid pulls the pads onto the disk.