Pizotifen works as a serotonin antagonist. It prevents migraine headaches by maintaining the levels of serotonin (a chemical messenger) in the brain and blocking its action, which helps prevent the loss of tone and dilation of blood vessels in the head.