It could be a pinched nerve, it could be muscle strain, it could also be related to your spine. Try using some ibuprophen and warm compresses, ask someone to give you a neck massage. If the pain does not go away in a few days then seek medical treatment, you may need a muscle relaxant.
It could simply be a sore neck. Perhaps you slept on it wrong. However, you should see a doctor, as it could be a sign of a serious injury to your neck or back. If you have been in any trauma recently, such as a car accident, you really need to see a doctor right away.
The pinching feeling in your neck could be caused by the way that you are sleeping. You may also need to change your pillow that you sleep on if it is getting to old for you.
Most likely, you have abnormalities in your cervical spinal cord. This may be due to a disk herniation compressing the spinal cord and the nerve fibers that contained in it.