Can I get pregnant even if I'm on the pill?

I had been thrown off for a week, after Tuesday I was supposed to be fine, I had unprotected sex on Wednesday, I've been taking my pill on time after that but now I have weird spotting, I'm nauseous and I have a headache, but those are the only symptoms I have, they're also side effects for my pill. Could I Be pregnant?