Input devices and Output devices are the peripheral devices attached to a computer CPU.
The computer CPU performs computations. The data is input or taken in from the input devices in to the main memory (RAM) before the computation and the results of the computation from RAM are stored back on to the output devices.
Input and output devices are handled by the operating system on the computer. The devices are scanned for presence and operation during the starting up of the OS. They are shutdown or closed when the OS shuts down.
The only way for a user to give data, speech, text, video inputs to the computer is via the input devices, that the computer OS recognizes. We have removable, plug and play, and fixed input devices.
Hard disk, key board, Pen drive, CD ROM drive, Floppy disk drive, DVD, ZIP drive, cartridge tape drive, Joystick, tablet mouse, mouse, optical mouse, infra red mouse, etc.. are all input devices.
The output of the computer is sent by the OS to the output devices through drivers resident in the OS. The various output devices are floppy devices, DVD, pen drive (external memory device), printer of all types, video monitor (display), tape drive, hard disk etc.
The computer is useless to us without any input and output devices.