Medicines that are prostaglandin inhibitors (ibuprofen, naproxen, mefenamic acid) often help to alleviate the pain. Remember that these medications work best when started as soon as possible after the period starts, or even 12-24 hours before the period starts, if it's possible to tell. It's also important to continue to be active when menstrual pain occurs. Physical activity has been shown to be more beneficial than just crawling into bed and doing nothing.
There are some girls (fewer than one percent) who have more significant pain with their menstrual flow and this may be an indication of a more serious condition. Problems such as endometriosis (a condition in which some of the tissue that lines the uterus starts to grow outside of the uterus) can cause severe pain. Infections of the fallopian tubes and uterus, as well as abnormalities of the uterus and the vagina, can also cause pain.
You should talk with your health-care provider about the pain that you are having. If this pain can't be managed with the standard pain medicines and is increasing in intensity over several months, you should have an examination of your uterus and ovaries.