system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How does software talk to hardware?

I get how GUI software communicates with the Operating System, but I don't understand how the OS and drivers etc actually work with hardware.
For example, how is information regarding the pixels we see on display decided on and passed around until it reaches a monitor?
I guess I'm asking an answerable version of the chicken/egg thing. What information starts where, where does it go, and how does it get there?
I hope this makes sense.


~EDIT~

Some fantastic explanations here guys thank you so much. In the process here I learnt the meanings of a fair few terminologies and concepts that I had taken for granted for years and tied together a few bits of bobs of information I had in my head.
Much appreciation. Many wow. Thanks.

~EDIT THE 2ND~

You wouldn't believe I study networking in my spare time. I guess, having ready your answers, I could have dissected, metaphorically, the components of a computer and logic'ed my way through! But I would not have ended up at the much clearer picture I have now!
gpt
Computers use a thing called Memory Mapped IO. Basically, the hardware makes itself look like just another chunk of memory so the CPU can read from and write to it.  

Most of the hardware systems are not connected directly to the the CPU. They hang off of the bus. The bus is effectively a set of wires that a bunch of devices all connect to. Each device on the bus has an address and there is some way to flip between reading and writing. 

So, to put pixels on a screen, the CPU would write the pixel color and coordinates into the bus buffer, set the address of the graphics card and tell it to write. The GPU would get that and do whatever it does to put images on the screen.