Amniocentesis is the most commonly performed invasive test for prenatal diagnosis. It is usually performed late in pregnancy (common human gestation is about 40 weeks. Amnio is usually done at 36) to test for lung development but can also be used to screen for genetic abnormalities (Down Syndrome etc.) earlier.

A needle is inserted through the mother's abdomen into the uterus, while the physician pushes the baby's head out of the way, and fluid is drawn and sent to a lab for analysis. It takes about 10-20 minutes. Though a local anesthetic is used the mother does feel pressure and often quite a bit of discomfort. The needle does not touch the baby, whose heartbeat is monitored for signs of distress.

Generally, other non-invasive tests are tried first and amnio is done later due to the risk (which is slight) of fetal injury.

sources:
Pregnancy Questions and Answers by Peg Palumbo
What to Expect When You're Expectiong A.Eisenberg, H. Murkoff, S. Hathaway

This write up is for masukomi and will soon be part of a parenting metanode - please /msg me is you would like to add factual material about pregnancy, childbirth, early childhood, or adolescence. Parenting experience prefered but not mandatory.