I would suggest that you make a visit with your primary care doctor
to discuss this issue. They will be able to perform a thorough physical examination and help you figure out what is going on.
One likely possibility is that you are suffering from muscle tension. This often occurs in the muscles at the base of the skull, right where the spine connects to the skull. You may notice, for example, that the pain is worse with stress or after a long day of work. It also may be made worse by sitting in front of a computer screen all day, or other tasks that involve neck strain. It is very common to also have pain in the temples at the same time; in fact this syndrome is usually called 'tension headache
.' Fortunately tension headache usually responds well to simple treatments such as stress relief, stretching exercises and improving posture, and simple pain killers. Your doctor can give you more advice about how best to treat the condition if they confirm the diagnosis.
At the same time, your doctor will rule out other potential causes of this pain, such as a spasm in the muscles of the next, a pinched nerve, or arthritis