newb: why resistor between signal and ground?

I'm walking through the 'Getting Started with Arduino' book. Just built the circuit for 'using a pushbutton to control an LED'. circuit works fine, but the book doesn't explain why I need the resistor that is in the circuit. the setup is as follows:

pushbutton on breadboard
one side of button goes to the 5v on arduino
other side goes to:

  1. a 10k ohm resistor, which then goes to GND on the arduino
  2. pin 7 (input) on arduino

So basically there's a resistor between the output side of the button and the GND on the board. Why is this needed? Does the GND care how much signal comes in? Seems it's a max 5V.

thx!

You need the resistor to always have a voltage level applied to the input and to stop it from floating. see:-
http://www.thebox.myzen.co.uk/Tutorial/Inputs.html