DMSO in PCR is used to reduce secondary structure in the template as well as reduces the annealing temperature of primers. The exact mechanism how DMSO does it is not exactly known.
Betaine at about 1molar destroys hydrogen bonding so all CG bases melt easier because the hydrogen bonding that holds the strands together are weakened so the template DNA melts much easier and re anneals with increased difficulty so giving the primers more time to anneal and extend before the template DNA itself re anneals and spoils the efficiency of the pcr
DMSO melts hydrogen bonds in a DNA and RNA duplex in conjunction with heat which is how is eradicates secondary structure
It is commonly used at 2-5 % but when eradicating secondary structure in targets at or above 60% GC can be used as high as 10%
Howver routine use above 5% especially when denaturing temp for sequencing and PCR are above 96C are contraindicated since this also melts hydrogen bond secondary structure in Taq polymerase and thus denatures amplitaq in big dye sequencing reactions and standard Taq in PCR
highly processive new generation polymerases like phusion incidentally are less prone to denaturing and so are routinely used at 98C
Betaine used at 1-2M by adducting with GC residues in nucleic acid effectively concerts their melting properties to AT residues: this has the effect of weakening duplex structure in general including hair pin loops and so facilitates melting
for regions with 4 consecutive runs of GC residues or average GC content > 60% use of 5% DMSO plus 1M b can be effective than either alone