The greater occipital nerve runs inbetween the neck muscle tendon insertions at the posterior (occipital) skull base.
It can get compressed and cause severe pains. First line treatment - motrin
around the clock for a week, muscle relaxation and gentle neck massages. If not better, try occipital nerve block. If not better soon, see your md for an examination to pinpoint the diagnosis.