It's an ultrasound wand that they insert. They are very gentle about this and they don't have to press up against the cervix or anything. It is very quick.
As for why: the cervix is like a long cylinder. Imagine a long can. It's what is between your babies and the world. As you get closer to giving birth, the can starts to get shorter (less mass between your baby and the world) and the bottom of the can starts to open, or dilate.
When you lose ALL of your cervical length, and the can is a pancake, you are 100% "effaced". The next thing to happen, if it hadn't already, is dilation, where the cervix starts to open.
If, early on in the pregnancy, your cervix is starting to shorten or even dilate, you will be put on bed-rest, to take pressure off of the cervix (it's not able to securely hold the babies in if it's starting to efface.) Sometimes this happens because of actual pre-term labor, other times it is just a weak cervix. And still OTHER times, a woman can have a "dynamic" cervix that is getting into the scary zone of length and then the next week *voila* back to the secure zone.
It's very good that the doctors are keeping an eye on your cervical length, it means you are in good hands.
If you have any problems with your length, join in the threads about that issue on the "Gestational Complications" forum. I used to frequent there.
xoxoxo