How to treat maigraine headache?

Several ways. You can try one or rather combinatination of below - lifestyle: smoking cessation, less alcohol use, regular sleep, healthy diet, regular exercise - avoid triggers: common triggers include coffee, chocolates, yellow cheese, other dairy products, red meat, nuts, alcohol - caffeine can also help in some individuals in reducing headaches - consult your primary physician or neurologist for meds.
Dark room. Sometimes resting in a dark room is all that helps. There are medicines called triptans that your doctor can prescribe that help many people. If they are infrequent, you might try excedrin migraine.