DpnI is a restriction enzyme specific for the sequence GATC methylated on the A. The extreme majority of E. coli strains methylate the sequence GATC using an enzyme called Dam. There are dam mutant strains such as JM110 that don't do this, but they aren't particularly healthy. This has two implications, one good, one bad.
DpnI specifically cleaves sequences with Dam methylation. You can therefore use this enzyme to destroy any DNA sequence that was harvested from E. coli. PCR products have no methylation, so they are unaffected by Dam methylation. When you are using a plasmid DNA as template for PCR, the template in the reaction can bleed through into the final products unless it is either separated from the PCR product by gel purification or destroyed with DpnI. So, in general, add DpnI if your template is plasmid. The enzyme works in all buffers including polymerase buffer and is exquisitely specific. So, it will never hurt your experiment, and very often it is essential.
The other issue with Dam methylation is that it can interfere with the digestion of plasmid DNAs occasionally. For example, Dam sites can overlap the restriction site for XbaI (TCTAGA) if the next bases in the sequences happen to be TC, which will occur every 1 in 16 occurances. So, if your sequence is TCTAGAtc, it won't be cut by XbaI. There is a second methylase in E. coli called Dcm, which hits the sequence CCA/TGG. This is less common an issue than Dam, but it's a good idea to check for Dam and Dcm methylation of your plasmid when designing cloning experiments.