How hearing works in the brain
Sound travels from your ears to your brain's hearing center, where there are two subsystems: The orient subsystem and the focus subsystem.* These constantly work together to help you understand the sound scene around you.
1: The orient subsystem constantly scans your surroundings to create a full overview of the sound scene.
2: The focus subsystem helps you select which sounds to listen to and which sounds to switch your attention to—while the irrelevant sounds are filtered out.
From here, sound is used by other brain centers including for memory and emotions.
*O’Sullivan et al. (2019) & Puvvada et al. (2017)