where do cramps come from??

so i have the worst cramps right now and im on my 2nd day of my period.... ughhhhh i hate my life and i hate being a girl!! why do cramps happen?? just cuz the blood is coming out or what?????😪