A headache can be caused by a problem in the neck. What we call that is cervicogenic headache. Most headaches do not come from the neck, most headaches have a different source, but there is a very specific type of a headache that is called cervicogenic headache stemming from the cervical spine - or in other words, the neck.
Cervicogenic headache usually starts in what we call the suboccipital area, which is that muscular area that is just under the occiput of the head. That pain starts there - it can be on one or both sides - and it tends to radiate up into the head and around the head. The easiest way to visualize it is to actually take the palm of your hand and place it on the back of the head and that really is where the pain spreads. More rarely, the pain can travel to the front of the head and behind the eye. Once again, that's not common and it is even less common for it to just appear in the front of the head or behind the eye, but it does happen.
In the image above we're looking at the back of the head, the neck or cervical spine, and specifically what we're looking at is these little joints. Now these are facet joints - or zygapophysial joints - the hinge-like joints in the spine. Now, these joints are true joints - in other words, they have the synovial fluid, synovial capsule, cartilage - and they can react like any other joint; in other words, they can get irritated, inflamed, and can become painful. Now, what's important in this context is that the innervations for these joints comes from a very small branch - called medial branch - that comes around here and goes into the joint. At times, that branch continues on and becomes another nerve. The nerve we're concerned about specifically is called the third occipital nerve. This nerve crosses the C2-3 facet joints and the facet joints are named for the different vertebral bodies that are interfacing and forming that joint, so this is a C2 and C3. So a C2-3 is crossed by the third occipital nerve, then continues onto the occiput and around the scalp. If there is irritation at this joint, this nerve tends to transmit pain and cause the pain that we're discussing - the pain that actually encompasses the occiput and the back of the head.