During a Pap smear, cells from the outside and the canal of the cervix are retrieved by gently scraping the outside of the cervix. The Pap smear is performed to detect cancerous or precancerous conditions of the cervix.