Amniotic fluid is typically collected through a procedure known as amniocentesis. This involves inserting a needle into the amniotic sac through the maternal abdomen to obtain a sample. The procedure is generally safe but does carry some risks, such as infection or injury to the fetus.