Final answer:
Sumatriptan works by activating serotonin receptors on brain blood vessels, causing them to constrict and countering the vessel dilation that usually leads to migraines.
Step-by-step explanation:
Sumatriptan prevents migraines primarily by targeting serotonin receptors, which play a key role in the development of migraines. This medication binds to and activates the serotonin (5-HT) receptors on blood vessels in the brain, leading to vasoconstriction (the narrowing of blood vessels). As a result, it reverses the dilation that contributes to migraine headaches. Additionally, sumatriptan can have an effect on reducing the neuronal activity and blocking the release of pro-inflammatory substances that can lead to the pain and other symptoms associated with migraines.