There are vast stretches of junk DNA in the genome, some with old genes for ancient viruses or parasitic sequences like transposons, and the way the cell keeps those parts of DNA away from cell machinery is by methylating the cytosine residues. The methyl groups prevent RNA polymerase from transcribing the DNA and therefore it gets silenced.
When a cell divides, the methyl groups are only on the original strand; the new complimentary strand doesn't have any. The methylation signal has to be actively transcribed from one strand to another; an enzyme runs up the DNA feeling for methylated cytosine residues. When it finds some, it starts methylating any cytosine residues that might be nearby on the opposite strand, to make sure the troublesome regions all stay commented out. That's why it's heritable.