It could be that your neck needs to be adjusted. Start with a Chiropractor and you should have better results that if you went to your Primary Care Physician.
It could be due to inflamation due to infection, Muscle contraction due to tension, Vascular headaches occur due to abnormal functioning of the blood vessel or due to Traction