Recommended · for beginners
Pull Up Resistor Tutorial | AddOhms #15
Why people recommend it
AddOhms explains floating inputs and how pull-up and pull-down resistors fix them; preferred by some over written answers for explaining what causes the floating state.
In their words
Also I recommend you to watch this youtube video to learn more about floating pins and pullup/pulldown resistors: Pull up Resistor Tutorial
Maximilian Gerhardt on arduino.stackexchange.com, Feb 2018. CC BY-SA.
I'd suggesting watching this video by AddOhms instead..
Evan Carroll on electronics.stackexchange.com, Oct 2015. CC BY-SA.