Early computers cycled round all of the peripherals attached to the computer in turn, asking if they required any attention.
For example when a device, such as a keyboard, reported that a key had been pressed and a character was ready to be processed by the CPU, a small program was run to collect the character from the device and move it in to memory.
This type of interaction with peripherals is called polling.
This type of interaction with peripherals is slow. It is roughly analogous to a teacher walking around a class asking each pupil in turn if they need any help, rather than watching for the pupils to put up their hand.