If someone is a pain in the neck, he or she is quite a pain indeed, because neck pain is hard to get rid of. Sometimes, you manage to screw up your muscles just by sleeping funny, but spending your days glued to a screen can also do the trick.
To avoid it, turn your head all the way to the left, so your chin is parallel with your left shoulder. Then, slowly drop your head, letting the weight of it guide you. What you're trying to do is make a half-circle motion, starting at the left, moving downward, and finishing at the right. Feel the pull on your muscles, and continue moving slowly to the right until your chin is parallel to your right shoulder. Head back the other way (no pun intended) and continue moving from shoulder to shoulder until the tension in your neck is released.
But why stop there? Another quick one to try is the shoulder shrug. Lift your shoulders high, up to your ears, and hold for a few seconds, then release. You can also move your shoulders in a circular motion -- first clockwise, then counterclockwise. You should be able to feel them loosen up.