An ear infection happens when fluid in the interior space behind the eardrum becomes infected, usually with bacteria. The tube leading into the body becomes blocked, and fluid builds up behind the eardrum. The increased pressure pushes the eardrum outward, causing pain and fever.