A middle ear infection, also called otitis media, is a common, often painful, type of ear infection that occurs behind the eardrum. Middle ear infections are caused by bacteria or viruses. A middle ear infection can interfere with the normal process of hearing and result in ear pain, hearing impairment, and other symptoms. People of all ages can get a middle ear infection, but it is more common in infants and young children up until the age of three.