How can I use a toggle switch with Arduino ?

MarkT:
Connect one side of the switch to ground, connect the other to the pin
Next task will be learning to solder and performing debouncing in software I think.

I already included software debouncing, but the thing is that the switch has 3 pins, what is the center pin for then ?