The Twin Button has two push-buttons on board-button A and button B. They can detect events such as a single press and a long press.
Push buttons are a form of simple input. When you press a button you actually close a circuit and let signals pass through. Single pressing a button is closing the circuit for a very short period of time and then open it, and double-pressing means rapidly repeating this process twice. Long-press or holding the button is closing the circuit for a bit longer before opening it.