This is nothing but a spasmodic muscle. No need to worry. The spasmodic muscle get tightened and restricts the movement of side to side rotation and side(left/right) bending of the neck as well. Just consult a physiotherapist you will get the complete relief within 15 days only.
Next Steps
Go to a physiotherapist.. Ultrasonic therapy +IFT +Heating therapy +some stretching exercises will be helpful for sure.
Health Tips
At home.. Frequent neck movements in all sides(upto full tolerable range) +hot water fomentation +pain killer gel +no prolong posture assumption of neck+no cold exposure +change of posture at night also+ no long travelling .