"pull-down resistors are used to hold the input to a zero (low) value when no other component is driving the input. They are used less often than pull-up resistors. Pull-down resistors can safely be used with CMOS logic gates because the inputs are voltage-controlled. TTL logic inputs that are left un-connected inherently float high, thus they require a much lower valued pull-down resistor to force the input low. This also consumes more current. For that reason, pull-up resistors are preferred in TTL circuits."
You use the pull-up/down to put the input of your MCU in a known state, and when you push the button or switch, you switch it to the opposite state. There are a few reasons for doing that, which you can look up in google.