In most cases people do not have serious problem with their stiff neck. In some cases they feel pain while in other cases they do not. When we move out body is not making a pain on us. But also there are some factors which can lead to neck pain such as tear, everyday wear, injury or overuse. In most cases neck injuries can happen during projects around the home, during work – related tasks, during recreational activities or during sports. When we suffer from stiff neck and when we try to move our head to the side, then we feel soreness and difficulty moving our neck. When we have stiff neck we can also have other symptoms such as shoulder pain, arm pain, headache and neck pain. This is a very common problem. In the most cases there is not a reason for which you should be worried. When you have stiff neck, then the stiffness and pain usually go on its own after a few days or weeks. The chances of having serious neck problem which can be linked with the stiff neck are small but they are not excluded. We can get stiff neck when we strain a muscle because of bad posture , use computer for a prolonged period  and sleep in awkward position . Stress and anxiety in many cases have caused tension in the neck which in the most cases is the reason for stiff neck.  You should not be worried about this problem. There are many tips which you can do it in your home and to improve this condition. You just need to talk with your doctor about those ways.
A twisted or locked neck: When people sleep in many cases they wake up in the morning and they find that their neck is stack in one position or it is twisted to one side.  When you have injury to your neck muscles, then this is a reason which leads to the previous mentioned condition. This kind of problem is known as acute torticollis. Which is the main reason for this kind of problem is not known. There are many causes for this condition such as carrying heavy unbalanced loads (this means if you wear a heavy bag just in one arm), bad posture and sleeping without adequate neck support. In some case this condition needs one week to be better but in the most cases this condition is improving from 24 – 48 hours. 
Wear and tear in the neck: Wear and tear occur to the joints and bones of your neck which in some cases leads to neck pain. This is a type of arthritis which is known as cervical spondylosis. This kind of arthritis occurs as we are growing older in natural way. Not in all cases this leads some kind of symptoms. But also there are cases when the bones are changing which leads to neck stiffness. Also the nearby nerves can be squashed which can result in numbness in the hands and legs, pins and needles and also we can feel a pain in our arms. In the most cases this condition will improve in a period of few weeks.
Whiplash: When you suddenly move your head sideways, backwards or forwards, then you get a condition which is known as whiplash. When we have road traffic accident, then this is the biggest cause which leads to whiplash. This movement of our head overstretches which means that it can damage the ligaments and tendons in the neck. This condition can cause headaches, reduced and painful neck movements and tenderness in the neck muscles. 
Pinched nerve: When we have a stiff neck which is caused by squashed nerve is a condition which is known as cervical radiculopathy. When you are getting older, then your spinal discs star to lose the water which is in them. This leads to splitting of the nails and they are less flexible. This means that when we get older, then we have the biggest chances to get pinched nerve. This kind of condition in the most cases is treated with painkillers although there are some cases when people need to make a surgery to improve their condition.
More serious causes: When you have stiff neck, then the reason which leads to it can be more serious. When your condition is worsening or you have constant pain in your neck, then you can have other symptoms such as problems walking, unexplained weight loss, a lack of coordination (you may find fiddly tasks increasingly difficult), loss of bladder or bowel control and a fever (a high temperature). They can be result from head injury, car accident etc. You should visit your doctor. 
These are some conditions of the stiff neck
 Cramer H, Mehling WE, Saha FJ, et al. Postural awareness and its relation to pain: validation of an innovative instrument measuring awareness of body posture in patients with chronic pain. BMC Musculoskeletal Disorders. 2018;19:109. doi:10.1186/s12891-018-2031-9
 Green BN. A literature review of neck pain associated with computer use: public health implications. Journal of the Canadian Chiropractic Association. 200;52(3):161–7.
 Lee WH, Ko MS. Effect of sleep posture on neck muscle activity. Journal of Physical Therapy Science. 2017;29(6):1021–4. doi:10.1589/jpts.29.1021
 Blozik E, Laptinskaya D, Hermann-Lingen C, et al. Depression and anxiety as major determinants of neck pain: a cross-sectional study in general practice. BMC Musculoskeletal Disorders. 2009;10:13. doi:10.1186/1471-2474-10-13
 Ludvigsson ML, Peterson G, O’Leary S, et al. The effect of neck-specific exercise with, or without a behavioral approach, on pain, disability, and self-efficacy in chronic whiplash-associated disorders: A randomized clinical trial. The Clinical Journal of Pain. 2015;31(4):294–303. doi:10.1097/AJP.0000000000000123
 Vos CJ, Verhagen AP, Passchier J, Koes BW. Impact of motor vehicle accidents on neck pain and disability in general practice. British Journal of General Practice. 2008;58(554):624–9. doi:10.3399/bjgp08X330762