At the base of the brainstem there is a bundle of neurons called the Reticular Activating System (RAS). The RAS acts as a kind of bouncer for the brain. Our senses take in waaaaay too information for our conscious mind to ever process, so we need to screen out data that is not relevant to us and allow through that which matters. The RAS does the filtering.

How does the RAS know what to let through? By focusing on something, we are telling the RAS “This is important to me.” So of all the myriad data our senses encounter, the RAS allows our conscious mind to process mostly that which we have declared important by what we give our attention.
We're Voting With Our Attention — by Leah Pearlman

https://www.awakin.org/read/view.php?op=audio&tid=2455