Sumatriptan is a medication primarily used for the treatment of migraine headaches and cluster headaches. It works by narrowing blood vessels around the brain and reducing substances in the body that can trigger headache pain, nausea, sensitivity to light and sound, and other migraine symptoms.