Pain during sex

When ever I have sex with my boyfriend and I get on top, it hurts me a lot and he always tells me to stop. Does anybody know why this happens?