How do we get temporary hearing loss from festivals/headphones?

Not everyone is a festival or concert kind of person, but after this summer, I have found that I definitely am. After listening to the Wallows on the first day of Reading, I experienced temporary hearing loss, as did all my friends while we were walking away from the stage. Everything sounded muffled, and I also appeared to be shouting at a very high volume just to be heard by my friends and just to hear my own voice, while at the same time, receiving weird looks from people walking around me. 

How do we get temporary hearing loss from festivals/headphones?