One of the easiest ways to let people know that you want to be left alone is to wear a pair of headphones. Either you won't be able to hear other people, or they will assume that you can't hear them. It is an easy way to show that a character is trying to drown out reality and other people. This trope is either used symbolically, where the headphones are a side effect of their isolation or deliberately when the character does this on purpose. The Scary Shiny Glasses can often do this too, in a creepier fashion.
It's also possible to use this impression to gather information: If people assume you can't hear or aren't paying attention, they might talk freely behind your back, and if you don't actually have the headphones playing any sound, you should be able to hear them with just a little muffling (or even without it, if it’s noise-cancelling headphones in pass-through mode). On the negative side, using them can also put you at risk of being mugged or worse, due to the music drowning out the sound of the approach of an opportunistic criminal. This is especially true of those who use them while exercising, such as joggers.
Possibly moving towards Discredited Trope territory, now that traditional bulky headphones are being replaced with much smaller earbuds (although in the late 2010s, large headphones appear to be making a comeback, especially wireless ones). However, some works may deliberately invoke this trope by having a character choose large headphones over earbuds precisely for this reason. Meanwhile people who are easily overwhelmed by ambient noise may wear ear defenders, or use noise-cancelling headphones.
Wearing headphones doesn't tune everything out in real life — smells, the floor rumbling, etc. — but can be used this way in fiction for the Rule of Funny.
Compare Ignoring by Singing (the character deliberately makes noise and/or covers his ears to avoid listening) and Fake Static (the character pretends to be unable to hear or understand a transmission). Contrast Bonding Through Shared Earbuds, which is the complete opposite; headphones, specifically earbuds, being used to facilitate companionship with others. Game Shows avert this sometimes by using a Sound Proof Booth.