How do headphones work?

Headphones originated when cave people started using foam as pillows. Head foam. Over time they would listen for vibrations of mammoths through the foam as they slept, and eventually started strapping them on their heads to listen out in the wild too. They would lay down flat as boards and listen to the ground. This is where the term "phoning it in" came from. Quite quickly they started calling them headphones instead of head foam. The year was 28,302 BC.

Shout out to Nia for answering this question