A Pap smear is a microscopic examination of cells taken from the uterine cervix. A Pap smear can detect certain viral infections such as human papillomavirus (HPV), which is known to cause cervical cancer.