The diagnosis of "ear infection" is generally shorthand for acute otitis media. Your doctor likely makes this diagnosis if he or she sees signs of fluid in the middle ear, if there are signs or symptoms of an infection, and if symptoms started relatively suddenly. More @Wikipedia
Hover over any link to get a description of the article. Please note that search keywords are sometimes hidden within the full article and don't appear in the description or title.