Brief, sharp, severe jabbing pains about the head, that resemble a stab from an icepick, nail, or needle, that, typically last from a fraction of a second to 1 to 2 seconds, are known as idiopathic stabbing headache or icepick headache.
These pains come as a single episodes or as brief repeated volleys.
Their locations is usually one sided, affecting the orbital, temple, and, parietal area.
It's harmless type of headache, with unknown reason (that's why the name is idiopathic)
Sometimes, the pains can be brought up by rapid alterations in posture, physical exertion, bright light, and head motion.
Ear ringing, can be due to different reasons.
Do you have some additional symptoms along with ear ringing?
When is the ringing most prominent?
For how long have you been experiencing ear ringing?