Ear infection (otitis media) Ear infections most commonly occur in your middle ear. Otitis media develops when bacteria and viruses become trapped in your middle ear. This type of infection is more likely to affect children than adults. Ear infection treatment usually involves antibiotics. In severe cases, ear tubes may be necessary.