How does the CPU receive, process and output information?
From what I know, and I might be slightly wrong here,
each device (Mouse, keyboard, screen etc') has a device driver.

The device driver is the one handling the communications with the CPU.
Where usually, each device has its own Data register, Status register and Command register (Where the register are basically mapped areas in memory for the device itself).

What happens is when any action is made (i.e pressing a key on the keyboard) the device "updates its status" to ready to send and stores the data it needs to send in some area of memory specifically saved for it, and then interrupts the CPU to perform the action needed.

The CPU sends "Ack" as acknowledgement and accepts the interrupt, executes it, and goes back to what it did before. (Only if the status is ready, otherwise does nothing).

(There are other methods such as busy wait that the device can notify and interact with the CPU).