For both men and women, pain can occur in the pelvic area during or soon after sexual intercourse. It can happen at any time during sex -- for example, at the time of penetration, erection, or ejaculation. Eventually, if pain from intercourse is ongoing, you could lose interest in any sexual activity.
The medical term for this is dyspareunia.
National Institutes of Health. National Institutes of Health State-of-the-Science Conference statement: management of menopause-related symptoms. Ann Intern Med. 2005;142(12 Pt 1):1003-1013.
Klein MC, Kaczorowski J, Firoz T, Hubinette M, Jorgensen S, Gauthier R. A comparison of urinary and sexual outcomes in women experiencing vaginal and Caesarean births. J Obstet Gynaecol Can. 2005; 27(4): 332-339.
Mahutte NG. Medical management of endometriosis-associated pain. Obstet Gynecol Clin North Am. 2003; 30(1): 133-150.