Your description indicates you had migraine headache
and it appears that it is the first attack.
For better diagnosis and management more details are needed like your age, sex, if your parents/siblings have any similar problem, any past such experience, preceding any eye or ear symptoms, associated symptoms like feeling like vomiting
or vomiting, if you had any stressful situation, any ENT or eye problems etc
If it is first attack you can wait and see. Nothing need be done.
But if it recurs, you will need to see a GP/Physician (Internist). At that time you can try a different pain killer till you see the doctor.
Wish you good health