This really depends on when you say your ear hurts, if you mean it is truly painful or just uncomfortable. It may not be an ear infection. It sounds like you may just have ear congestion. This is normally described as having: muffled hearing, crackling or popping noises, a stuffy full sensation in the ear, and usually no pain. Constant pain would mean that you should be seen.
At home you can try:
Swallowing water while your nose is pinched closed
Decongestant nasal spray
If you have any allergy symptoms go ahead and take an antihistamine.
If your ear is truly painful you can take ibuprofen, apply cold compresses, and use olive oil drops (just 2-3) until you can be seen.
Please let me know if you need further information. I will be happy to help. T