If you sense that a migraine is coming on, try to find a quiet, dark room where you can rest. Take medication as early as possible in the course of the migraine. Putting a cold washcloth on the back of your neck may help by numbing the area; applying a heating pad may relax head and neck muscles.
From a longer-term perspective, aim to maintain regular sleep, eating, and exercise habits. Keep a log of what triggers your migraines so that you can identify and avoid those triggers, and develop a treatment plan with your doctor.