Pain after sex?!?!?

I had sex with this guy twice... He wasn't necessarily BIG, but he was alright. The first time it was okay, it was enough to be pleasing, but in the middle of the second time I got this weird pain in my behind( like anal area), and it hurt to walk, use the restroom, and even sit for like a week. I mean like almost crying hurting. Why did that happen?
​**the second time we tried a lot more positions and it was a lot more intense.