When that jackhammer starts outside your bedroom window, you'll be happy (or at least less angry) to know that there is a muscle in your ear that contracts to block the high-intensity sounds that potentially could cause major damage. The acoustic reflex just so happens to let you hear for another day!
The muscle contraction is completely involuntary and occurs in the middle ear of mammals. When a high-intensity sound stimulus appears, the stapedius and tesnor tympani (fancy medical terms for muscles in your ear) contract. The reflex itself, which pulls and stiffens ear muscles, decreases the vibrational energy to the cochlea (the place where the vibrations are converted into electrical impulses that the brain processes into sound).
The reflex can reduce the sound's intensity by about 20 decibels in the inner ear simply by anticipating the intensity of the sound as it reaches the outer ear. This makes the signal that is sent to the brain a little less intense. The brain can only process so much sound before you feel your head start to throb.