In the broadest sense, hardware is your computer and whatever connects to it; everything else is software. A device (also called a peripheral) is any part of a computer other than the processor (CPU), motherboard, memory (RAM and ROM), and case. Your monitor, mouse, keyboard, hard drives, scanner, and printer are devices, as are digital cameras, smartphones, MP3 players, iPods, backup drives, video recorders, external speakers, USB flash drives, and personal digital assistant (PDA) synchronization cradles.
Windows treats any gadget connected to your PC as a device. The software that controls it is called its device driver or simply driver. A driver mediates communications between a device and Windows.