Polymerase chain reaction (PCR) is a laboratory technique that makes millions of copies of a short segment of DNA until there are enough copies for analysis and detection. The PCR test is a diagnostic tool used to detect infections, such as influenza, coronavirus, HIV, hepatitis, and salmonella. It is also used to diagnose cancer, diseases of the central nervous system, and autoimmune diseases.