[edit on Wikidata] A spasm is a sudden involuntary contraction of a muscle, a group of muscles, or a hollow organ such as the heart. A spasmodic muscle contraction may be caused by many medical conditions, including dystonia. Most commonly, it is a muscle cramp which is accompanied by a sudden burst of pain.