The Android Debug Bridge (adb) is a development tool that facilitates communication between an Android device and a personal computer. This communication is most often done over a USB cable, but Wi-Fi connections are also supported.
adb is like a "Swiss-army knife" of Android development. It provides numerous functions that are described in detail by the command adb --help. Some of the more commonly used commands are listed in the "popular adb commands" section below.
Google hosts zips including only adb and fastboot. You can set these up for use with the instructions below.
Download the Windows zip from Google.
Install the universal adb driver, and reboot.
Download the macOS zip from Google.
Extract it somewhere - for example, ~/adb-fastboot.
Download the Linux zip from Google.
You may also need to set up udev rules: see this repository for more info.
Open Settings, and select "About".
Tap on "Build number" seven times.
Go back, and select "Developer options".
Scroll down, and check the "Android debugging" entry under "Debugging".
On the computer, open up a terminal/command prompt and type adb devices.
A dialog should show on your device, asking you to allow usb debugging. Check "always allow", and choose "OK".
Congratulations! adb is now ready to use with your device.
Using fastboot (if your device supports it) should simply involve rebooting to fastboot mode. While in fastboot mode, you can type fastboot devices to verify that your device is being detected.
adb pull <remote> [<local>] - pulls the file <remote> to <local>. If <local> isn't specified, it will pull to the current folder.