I would recommend that you go to see your primary care doctor
about this issue, especially if the pain is persistent and not improving.
The most likely explanation here is that you are experiencing some muscle strain
or spasm in the muscles between the shoulder and the spine that are involved in moving the shoulder and supporting the neck. These muscles are commonly fatigued and strained, most often due to poor posture (for example, in those who have to sit hunched over a computer screen all day long). Generally speaking, this is not a serious medical problem, and it can be resolved by a combination of better attention to using good posture together with stretching and strengthening exercises (which your doctor can describe to you) and anti inflammatory medications for the pain and spasm.
Your primary care doctor can also examine the area to make sure that there is no evidence of a pinched nerve or other nerve issue. Although nerve issues in the neck are less common than simple muscle strain, they do occur, and they sometimes require more aggressive medical treatment. Start by setting up an appointment today for a thorough evaluation with your primary care doctor!