PCR requires magnesium ions (Mg2+) as essential cofactors for Taq polymerase activity. Mg2+ stabilizes the DNA duplex and is required for the polymerase to function properly. The concentration of Mg2+ also affects primer annealing and specificity. Lithium, calcium, and sodium are not required cofactors for PCR.