Mercury switches consist of a set of electrical contacts in a sealed glass envelope which contains a bead of liquid mercury. When the switch is tilted in the appropriate direction, gravity pulls the liquid mercury in a downward direction, causing the mercury to touch the contacts, thus completing the electrical circuit. Tilting the switch the opposite direction causes the mercury to move away from the contacts, thus breaking the circuit.
Mercury switches are commonly used in thermostats and mechanical systems that are controlled electrically where the physical orientation of actuators or rotors is a factor.