That is a great question. There are a variety of reasons for pain in the back of the head that you are describing. These are some questions to consider as they may help elucidate what is the underlying cause for these headaches. Is the pain on one side or both? Does it radiate anywhere else (i.e. down the arms or legs)? Does the pain only occur when you are do exercises in the upper body (i.e. neck manipulation) or is it with all exercises? These are questions to think about and bring up with your primary care doctor
because along with your medical history and presenting symptoms, he or she will better be able to decide upon the appropriate work up. This may include lab tests or imaging studies and perhaps a referral to a specialist. Based upon the description you have provided, some of the diagnoses that are more likely include dehydration, deficiencies in nutrients or vitamins, and overexertion of the muscles in your neck. Other less likely possibilities include occipital neuralgia or metabolic disorders. Some things to possibly treat the symptoms you are experiencing include muscle stretching, ice or warm packs, ensuring that you are well hydrated prior to working out.