Off-On Switches Laptop power button:
Switches allow electric current to flow by closing the circuit, or stop electric current from flowing by opening the circuit. There are several types of switches as you can see in the photo below.
When you press the switch (the push button), you allow the current to flow. It helps taking a look at the photo below.

Push buttons usually have four legs, these legs are always connected in a pair. When the push button is pressed, all the 4 legs are connected and the current flows.

You can use a digital meter to test button switch, set to a buzzer mode. A good switch with a good contact should make the digital meter produce the buzzer sound. No sound means the switch is defective.
