A USB device, sometimes called a peripheral, is any piece of hardware that connects to a USB host and responds to its commands. Flash drives, external hard drives, printers, keyboards, mice, webcams and countless other accessories are all USB devices in this sense.
A device does not control the connection or provide the timing for data transfer, and in most everyday setups it relies on the host, such as a computer, for power as well, unless it is self-powered with its own supply. Many mobile phones can act either as a device, when connected to a computer for charging or file transfer, or as a host, when using USB On-The-Go.
Recognising which side of a cable is the host and which is the device helps when diagnosing connection problems, since some issues, such as a device drawing more power than the host can supply, only make sense once the roles are clear. See our USB troubleshooting guide for more.
