My take one your question about the switch:
When the switch is open, there is infinite resistance to +5v. Current will always take the path of least resistance which in this case is through the 10k resistor to ground. This holds the pin input low.
When the switch is closed (pressed) there is zero resistance to +5. Current will always take the path of least resistance which in this case is through the switch to +5 pulling the pin high.
There are times when pullup resistors are necessary and can't be implemented internally so it's a good concept to understand.