Voltage Dividers in a pull-up resistor circuit (why does the pin go to low)
When you press the button, you connect the input pin, and the bottom end of R1, to ground.

Current will flow through R1, and through the button to ground.