Every peripheral device (keyboard, modem, monitor, etc.) requires a control circuit that interfaces with the computer's processor (CPU). These circuits are either built into the chips on the motherboard or are contained on plug-in cards. See chipset
On the Motherboard
A fully equipped PC motherboard has built-in controller circuits for all the basic peripheral devices. It has sockets for the internal drives (hard disk and CD/DVD) and ports for external devices: keyboard, mouse, speakers, etc. The motherboard typically also provides built-in circuitry for the monitor and network.
Via Plug-In Cards
Additional input/output can be added by plugging in controller cards into the motherboard's PCI or PCI Express slots. For example, a higher-quality graphics card can be plugged in, and the built-in circuit can be disabled. See PCI
All peripherals require driver software, which enables the OS to command the hardware. When a peripheral device is added that is new to the computer, a controller card is plugged in, and a driver is installed.
These peripheral interfaces were found on earlier PCs. If a device requires a mouse, keyboard or serial port, adapters are available that convert them to USB. See legacy port