Hum... I can think about inflammation of the hair follicles... The skin hurts, not precisly the... hum... brain skull... Is that more or less what you feel ??? You know, it is not precisly a headache...
If you feel that what hurts is the skin of your head, perhaps you should see a dermatologist

It can be due to stress, some corticosteroids will help.