How can I know if my child has an ear infection?

You can't. Short answer: you can't. If they complain of pain, it is possible, but even that might be misleading. (it might be from something else and just feels like it is from their ear.) ear infections don't always need treated, either. Sometimes, you're actually better off waiting as it might do just fine without an antibiotic. The only way to know for sure is to have it checked; we'll talk about options.
Needs Expert Exam. Unfortunately the only absolutely accurate way to know is for someone qualified to exam the ear.Remember that pulling the ear or even an earache is not necessarily an ear infection. Also a red ear on examination does not always mean infection. You need to see your pediatrician.