Period and sex

I was on my period and then it stopped. I had sex and then I began to bleed and the bleeding hasn't stopped. Can someone help explain to me what's going on?