An operating system (OS) interacts with external devices like printers, scanners, and cameras through device drivers and APIs (Application Programming Interfaces). When a user initiates a task involving an external device, such as printing a document, the OS communicates with the device driver, which serves as a translator between the OS and the hardware. The device driver sends commands and data to the device, manages data transfers, and handles device-specific functions. Additionally, the OS provides APIs that allow software applications to communicate with external devices, enabling developers to create programs that utilize the functionality of printers, scanners, cameras, and other peripherals. This interaction enables seamless integration of external devices with the operating system and facilitates their use by end-users and software applications.