USB debugging is a connection mode on Android devices which allow a USB connected computer to interact with the device. This can be used to e.g.
- transfer data between the computer and the device
- reading log data from the device
- execute commands directly on the device
- debug applications running on the device
By default, USB debugging is disabled with stock ROMs (some custom ROMs however have it enabled by default). To toggle it on or off, you can find the corresponding switch in Settings › Development – a section originally hidden with Android 4.2 and up. You can make this section visible by going to Settings › About device and "hammering" the entry telling your ROM's build version until a toast-message congratulates you for having become a developer.