Why do I always have a terrible headache or even migraine, a day before I get menstruation? How can I cure that?

Estrogen. It is generally accepted that premenstrual headaches are secondary to the drop in estrogen just before the menstrual cycle. There really is no cure other than menopause, but there are medications which can help considerably taken before the cycle. You would need to consult your doc on which meds are right for you.
Menstrual migraine . You may be suffering from menstrual migraine or estrogen-associated migraine. This may be seen with decline in estrogen, such as at the beginning of the menstrual cycle. If you in fact suffer from this condition, your doctor can prescribe specific medications for you to take just prior to the onset of your menstruation as to prevent the headaches. Certain types of magnesium supplements may help.