I should add, also, that if you get a stopped up sinus and it gets infected, it'll also make your head hurt, in which case the same docs who check your ear, can also look up in your nasal cavities.
It's likely that since your lymph glands are swelling, you have an infection either in your ear or in your mouth, perhaps a tooth. Push on each of your teeth on that side of your head, and if one hurts, you should see a dentist. If none of your teeth hurt, then you should visit either your family doc or an ear nose throat ENT doc, and have them look in your ear and treat any infection in there. Also, if it's neither of those, those docs will know who to refer you to, if it's something beyond what is most likely.