The tilt switch used here is a ball one with a metal ball inside. It is used to detect inclinations of a small angle.
The principle is very simple. When the switch is tilted in a certain angle, the ball inside rolls down and touches the two contacts connected to the pins outside, thus triggering circuits. Otherwise the ball will stay away from the contacts, thus breaking the circuits.
2.1.5 Tilt Switch (C Project)
3.1.12 GAME - 10 Second (C Project)
2.1.5 Tilt Switch (Python Project)
4.1.18 GAME - 10 Second (Python Project)
1.3 Tumbler (Scratch Project)