Pain with sex?

It’s worse in doggy Style but still a mild pain in any other position but I’m having pain in my lower stomach like between my vagina and lower stomach. It hurt so bad I had my boyfriend stop and I was on the ground in really bad pain for a few min and it got a little better but it still hurt for the next 10 min. It’s happened on a few occasions but this time it was really bad. What could it be