Painful Sex

Last night me and my partner had sex, sex has never ever been painful to me but last night when he was on top I had really bad pains on the right side of my abdomen, it was so painful I started crying lool then we tried a different position and it was fine? Any explanations?