Thanks for posting your query.
Pain you have seems to be due to muscle spasm over neck and shoulder.
I suggest you to consult an orthopaedician nearby for a detailed examination. You may get the X-ray of the area affected under his/her guidance.
Meanwhile you can take non-steroidal anti-inflammatory drugs (NSAIDs) like ibuprofen
to reduce inflammation and pain and muscle relaxants to calm spasm.
I also advice - Do not sit for prolonged period of time in stressful postures
Do not lift heavy weights on head or back.
Do use firm mattress, thin pillow or butterfly shaped pillow
Wishing you good health
Dr Saurabh Gupta