What you are experiencing, at least to the best of my knowledge, is a sign of a migraine. It occurs in roughly 40% of migraine sufferers and is dubbed the "ice pick pain". I would recommend lying down for a while, drinking lots of water, making sure to stay in a cool area with little light...