On the pill but I'm having discharge. Need help

So me and my boyfriend had unprotected sex a few times but he pulled out. I'm on the pill and as of now my period should be coming in 14 days but for the past 2 days I've had cramps and brown discharge. Any suggestions on what's going on?