HPV testing is typically performed on samples collected from the cervix, using a swab during a Pap smear. The sample is then analyzed in a laboratory to detect the presence of high-risk HPV DNA. Techniques such as Polymerase Chain Reaction (PCR) and Hybrid Capture 2 (HC2) are commonly used for this purpose.