An electric foot switch works like any other switch.
Inside the foots witch there are contact points, the wires of the foot switch are connected to the electric circuit of a device.
When the foot switch is compressed the contacts will be closed, connecting the electric circuit and switching the machine to “on”.