Using the Arduino tutorial "Button", I have noticed that if I totally disconnect Pin2 from the circuit, the LED comes on dimly.
I am trying to understand HOW this happens. Is it simply due to being a floating ground?
pinMode(buttonPin, INPUT); line tells the board to set the
buttonPin in high impedance mode.
When you disconnect the wire the state of that pin becomes unknown; usually it oscillates. Since it is oscillating, the LED turns on and off randomly: you see it "dimly light".
The usual solution is to use a pull-up or pull-down. I suggest you to wire your buttons towards the ground, declare the pins as
pinMode(buttonPin, INPUT_PULLUP); and invert the logic (i.e.
buttonState = !digitalRead(buttonPin);). This way it will never oscillate again.