There’s a number of different reasons why it could hurt. Many of them have to do with medical issues so the next time you see your gynecologist or internist, I STRONGLY advise that you discuss it with them. (STD’s are a possibility…)
However, a common reason why certain positions hurt is because he’s penetrating you more deeply and possibly hitting your cervix. If your cervix is closer than average or tilted, he could be banging against it. PAINFUL! It’s another reason to talk to your doctor because they can examine you and tell you if that’s the problem.
Sex should not hurt (if you’re not a virgin). So this is definitely a problem you need to address with your doctor ASAP so that you can find out why this is happening. Avoid those positions that hurt until you get to the bottom of this.
Also, try using lube! You might not be aroused enough sometimes and if he’s pumping away, that’s extremely unpleasant.
And tell him to take it easy and be more gentle. He might be going too hard and being too rough with you, especially in those positions where he has the opportunity to penetrate you more deeply.