Your doctor will take your medical history and perform a physical examination.
Medical history questions may include:
When did the pain begin or has intercourse always been painful?
Is intercourse painful every time that it is attempted?
Is it painful for your partner as well?
At what point during (or after) intercourse does the pain begin? Upon entry/penetration? During ejaculation?
Where, specifically, is the pain?
Does anything make the pain better?
Do you have any other symptoms?
What are your attitudes towards sex in general?
Have you had a significant traumatic event in the past (rape, child abuse, or similar)?
What medications do you take?
What illnesses, diseases, and disorders are you being treated for?
Have you had a significant emotional event recently?
Have you ever had pain-free sex with this partner? With any partner?
It may be best to see the doctor together with your partner. Physical examination may include a pelvic examination (for women), a prostate examination (for men), and a rectal examination. If a physical problem is suspected, appropriate tests will be ordered.
Antibiotics, painkillers, or hormones are amongst the treatment options that may be considered.
Prevention:
Good hygiene and routine medical care will help to some degree.
Adequate foreplay and stimulation will help to ensure proper lubrication of the vagina.
The use of a water-soluble lubricant like K-Y Jelly may also help. Vaseline should not be used as a sexual lubricant because it is not compatible with latex condoms (it causes them to break), it is not water soluble, and it may encourage vaginal infections.
Practicing safe sex can help prevent sexually transmitted diseases.
References:
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.