Welcome to e health forum.
Pain before the cyclic menstrual bleeding is due to uterine contractions and spasms which are natural and are induced by change in hormone levels.
In case, they are intolerable or cause much discomfort, you can try medications like Naprosyn or Advil available over the counter, which will reduce the symptoms.