what's up with my period?

I got my period two weeks ago. Cramps, headache and everything. When I got done, I had sex with my boyfriend frequently(at least 4 times in the week). After sex though, I would have my contraceptive pill and I just started having the pill two weeks ago in my entire life. 
And now, I just got my period yesterday. Without notice. Cramps, headache but moderate bleeding. 
What's going on? I'm freaking out. I'm 23 :)