In general, they are only somewhat uncomfortable and are over pretty quickly, but some women do find them a little painful. If it hurts, speak up so your provider knows and can stop.
A cervical exam is when your doctor or midwife inserts two fingers into your vagina to assess your cervix. This can be done at a prenatal visit if you are having contractions or are close to your due date, or when you are in labor to see how your labor is progressing.
In general, the more posterior (or far back) your cervix is, the more uncomfortable the exam can be. The good news is that once labor progresses, your cervix will move to a more anterior position, and this can make the exams easier. To help you stay comfortable, your provider will guide you into a position that makes it easier to assess your cervix. Try to keep your legs in a relaxed position as much as you can so the exam can be over as quickly as possible!