A button is a small closed mechanism that connects to circuits.
This mechanism works by using a spring to make contact between 2 small pieces of metal allowing electricity to flow through and finish a circuit.
Some buttons require being held down while others you can just push once and it will stay down until it is pressed again.