Tizanidine is primarily prescribed to alleviate muscle spasms and spasticity. It works by blocking certain nerve signals that cause muscles to contract, thereby reducing muscle tone and promoting relaxation.