It is hooked up to a PWM cable. You only need to wire the ground and signal (black and white, respectively) as the positive (red) wire has no use in a switch. Instead of plugging it into the PWM section of your RoboRIO, plug it into the section designated for digital inputs.
Programming side:
Code:
DigitalInput _switch1 = new DigitalInput(0);
if(_switch1.get) {
System.out.println("Switch 1 is pressed!");
}