Why Digital inputs are high impedance, so if nothing actively drives them they float and pick up noise, reading randomly high or low. A pull-up resistor ties the line to V+ and a pull-down ties it to ground, so the line sits at a defined logic level whenever the driving device is open circuit (for example a switch that is not closed, or an open-collector/open-drain output). Typical values are a few kilohms: high enough not to waste current, low enough to overcome leakage and noise.
Watch out The key-click choice describes RC shaping of a CW keying waveform, which is a transmitter filtering issue and has nothing to do with defining a logic level on a floating line.
Pull-up/pull-down = give a floating input a home. Up to V+, down to ground.