Some positions really hurt?

I'm newer to sex but I've been having it with my boyfriend for about three months now but some positions still really hurt? It almost feels like it hurts in my anus though, like he's slamming against it, even though we're definitely having vaginal sex! Anyone have similar problems???