I use the Arduino as an example, but many other configurations are possible.
Step 1: The pinouts
The pinouts of the switch are pretty straight forward. There are two pins for Voltage In (VIN), two for Voltage Out (VOUT), four for ground (GND) and one pin marked OFF.
Step 2: Wiring it up
The key to this switch function is the OFF pin. Here, I have it wired to pin 7 of the Arduino.