A muscle spasm is an involuntary contraction of a muscle that can cause pain. When joints become injured or inflamed, surrounding muscles can spasm, causing pain and limitation in motion.
Muscle spasms are typically treated conservatively with muscle relaxants and exercise therapy. Muscle relaxants inhibit painful contractions by sedating the muscle, and exercises stretch and strengthen the muscles so they are less likely to strain, tear, or spasm. Applying heat therapy using a heat pad may also help relax muscle spasms.