Miscarriage

How do I know when it's a miscarriage. I missed my period in January but I thought it was cause I started going to the gym. I got my period February 2nd and it was really heavy and I was cramping really bad. Could the gym have made me miss my period or could It had been a miscarriage?