Sex shouldn't hurt when you don't want it to. The only time sex should hurt is when you want it to hurt. Spanking, nipple pinching, and other kinds of rough play have an honorable history among consenting adults. But sometimes sex hurts when you don't want it to.
Good sex requires physical comfort.
Take your body's signals seriously. Discuss your limits with your partners. Sexual acts themselves can be painful. Active lesions from STDs such as herpes can make even light pressure painful. More serious physical causes include endometriosis, fibroids and Peyronie's disease.