What is a PCR test, and how does it work?

What is a PCR test, and how does it work?