What is this allergy and how can we cure it?

I couldn't get any better photos because he was being very energetic and running here and there. But if you would notice his head, he is losing some hair and it looks like some sort of allergy. I don't have any prior experience. Is there some medicine that I can give to this pup to get him well?

I couldn't get any better photos because he was being very energetic and running here and there. But if you would notice his head, he is losing some hair and it looks like some sort of allergy. I don't have any prior experience. Is there some medicine that I can give to this pup to get him well?