Lots of great exercises for neck pain.You don’t want to overdo it as you can easily increase neck pain [ ultimately, that just defeats the purpose ]. My suggestion is to stick with simple forward flexion exercise, extension back, right lateral flexion (right ear to the right shoulder), left lateral flexion, right rotation and left rotation. For each movement, you don’t want to over do it , and only go to the point of pain. There are certain movements that you may not be able to do at all, and that's okay.
One more exercise I want to add is a great exercise for forward head posture. This type of head posture is prevalent in people who use the computer a lot and don't have good posture while doing it. You have probably heard of text neck or tech neck- well that FHP. It can be cause of neck pain, stiff neck, bad posture and headaches. Head Retraction exercises help with this immensely. Basically imagine that your head is a ball and it is your job to translate your head back. Hold it there for 5-10 seconds and do it again. Repeat 10 items. Basically you are bringing the head back in this exercise. Keep your chin tucked and look straight ahead while doing this exercise.
A few other things that can help is using a hot and cold pack. Heat will actually help to ease muscle spasms and relax the neck muscles. Another great idea, use a special contoured neck pillow so that you have the right posture for sleep at night. Finally, you can use a natural pain relief gel like sombra to help you ease trigger points in the neck. Incidentally, Sombra works even better with moist heat therapy.