Painful sexual act is a medical problem where a person feels pain in their genitals before, during, or after a sexual act. Doctors call this problem dyspareunia. It can have physical or emotional causes. Both men and women can have dyspareunia. Up to one-fifth of women (one in every five) may have dyspareunia at some point in their lives.