the addition of methyl groups to the DNA molecule; it is an epigenetic mechanism used by cells to control gene expression