Thanks for putting your query over here.
I would like to know since when you have the pain,what is your age and occupation.
It is not due to rubbing your shoulders.It can be due to
cervical spondylitis.
You need to visit an orthopaedician for confirmation of diagnosis.Many a times the pain of cervical spondylitis goes away by itself after few years.What all you need to do is take pain killer like
ibuprofen or naproxen as and when needed,also applying hot or cold packs may also help.
Besides you can use soft collar or so called Phillipines collar to support your neck.Avoid walking or standing for too long.Avoid prolonged extension of neck.While at work,use chairs which provide proper rest to your neck and back.Do back strengthening and neck flexing exercises.
If still there is no improvement or your symptoms worsens,you need to visit orthopaedician who may prescribe you with
muscle relaxant or
narcotic drugs to be taken under supervision. If still refractory to all these non
surgical treatment,the specialist may advice for surgery.
Thanks and regards.