Spasmodic torticollis, also known as cervical dystonia, is a painful condition that causes the neck muscles to contract involuntarily. This can make you twist your neck or turn your head to one side. It may also cause your head to tilt forward or backward.