Period pain

i thought i was the only one it happened to! i dunno why, but i always get diarrhea during this time. does anyone know why it happens?