 When a microcontroller's input pin is not connected to any electrical signal, it's said to be floating. It sounds peaceful, but a floating pin can appear in a different random high or low state whenever it's read by a microcontroller. Now consider connecting a normally open switch to that floating pin. Without a known default state for the pin, we'd have no way to tell if the switch was definitely pressed or not. That's where pull-up resistors come into play. By connecting a 10k ohm resistor between the input pin and positive voltage, we effectively give the pin a default high state. When the switch is pressed, it creates a connection from pin to ground with almost zero resistance, much lower than the pull-ups 10k connection to positive voltage. When the chip reads the pin, that path of least resistance determines its new low state.