qPCR works by amplifying DNA using a polymerase chain reaction while simultaneously measuring the amount of DNA generated during each cycle. This is achieved using fluorescent markers that emit fluorescence proportional to the amount of DNA present. The fluorescence is measured in real-time, allowing for the quantification of the DNA.