You can just use the pull-up resistors built into the Arduino. Hook one side of the switch to Ground, and the other side to an input pin.
One the left is what you get with INPUT pin mode, which is bad, because the pin is floating when the switch is open.
On the right is what you get when using INPUT_PULLUP. It will be read high when the switch is open and read low when the switch is closed.