Headaches and migraines can be caused by numerous factors.  These factors often involve the neck and the tension associated with the surrounding musculature. When the muscles in your neck become tight, they can pull not only on the surrounding muscles but the cervical spine as well as the skull. thus aggravating the nerves of the head and neck resulting in headaches and migraines.
There are no pain receptors inside the brain so headaches although often correlated with the inside of the skull are actually outside of the skull related to the scalp, sinuses, muscles and joints. Headaches and migraines can be triggered by many factors but each individual can have different triggers. Major triggers for headaches and migraines can include stress, anxiety, medications, sleeping too much or too little, changes in weather, dietary changes, allergies, muscle tension and misalignments in the spine.