This can occur due to disc problems in the cervical spine
. When there is prolapse of the disc causing pressure on the nerves, it gives rise to this type of pain. Sometimes the pain can go along your arm and can also cause weakness of certain muscles it supply.
You are recommended to see your doctor, who will examine you, ask for some scans accordingly and plan your treatment course.
Till that time take some pain killers to reduce your pain.