How do I make a switch on the Arduino?
What you need is a pull-up resistor.



The Arduino whebsite has a nice tutorial (with software) on using a pushbutton.


  We connect three wires to the Arduino board. The first goes from one
  leg of the pushbutton through a pull-up resistor (here 2.2 KOhms) to
  the 5 volt supply. The second goes from the corresponding leg of the
  pushbutton to ground. The third connects to a digital i/o pin (here
  pin 7) which reads the button's state.