Thanks for your question.Painful sex or
dyspareunia in women is mostly commonly seen due to inadeqaute
vaginal lubrication.This problem can be overcome by keeping oneself more relaxed,increasing foreplay and use of lubricants.Besides this few underlying diseases may be the culprit.These are vaginismus(vaginal muscle spasm) that can be due to fear,cervix or vaginal infections(yeast),uterine problem(fibroids),
endometriosis,
pelvic inflammatory disease,STD's(sexually transmitted infections like chlamydia,herpes etc),injury(child birth,tear,cut etc),menopause etc.Some are treatable without seeing doctor like vaginal dryness(lubricant use),menopause(oestrogen cream application),vaginismus(relaxed atmosphere).Even if problem is not resolved or there are assosciated symptoms like
vaginal discharge,itching,abdomen pain,bleeding or irregular menstrual cycle the see you OBGY doctor for examination and diagnostic tests like ultrasound.Some times when no cause is found the issue can be purely psychological where you need to talk to your partner regarding any issues or conflicts.Sex counsellors sometimes are helpful.Hope it helps you.Thanks