The Eustachian tube goes between the middle ear and back of the throat and is there to equalize the air pressure in your middle ear. When you yawn or swallow it opens. That's why yawning pops your ears when you're in an airplane. Often children's Eustachian tubes so not develope and they have chronic issues with fluid in the middle ear that can't drain, so they will have "tubes" installed in their eardrum which allows fluid to drain out of the middle ear into the ear canal.
I currently haven't been able to hear for 3 weeks because of trapped fluid due to some kind of sinus issue. The problem is that the snot gets thicker as it sits in there so it won't drain out. Hopefully it resolves on it's own, but I may have to have my eardrum sliced open and have it sucked out.