Ear infection is typically a middle ear infection, also called otitis media, according to WebMD. It occurs when the tube that drains the ear is blocked, allowing bacteria to grow in fluid trapped behind the eardrum.
The middle ear is the region behind the eardrum which is typically air-filled. In a middle ear infection, fluid is trapped in that space because the Eustachian tube, which normally drains the middle ear, is blocked or swollen shut, often because of a cold, sinus infection, or allergies. This lack of drainage produces pain and can allow bacteria to grow more readily in the middle ear. Middle ear infections are more common in young children because their Eustachian tubes are narrower and more horizontal than those of adults. Doctors can easily diagnose middle ear infections using an instrument called an otoscope that can be used to examine the eardrum. While most cases get better on their own, doctors can prescribe antibiotics to treat more severe bacterial infections of the middle ear, according to WebMD.