The process of methylation is a form of transcription control in eukaryotes. Methyltransferases attach "methyl" groups to Cytosine-phosphate-Guanine sites in DNA. A large number of these methylated CpG sites, called a CpG island, in gene's promoter region can inhibit its transcription. Some cancers "use" methylation to knock out tumor suppressor genes. Epigenetics can be complex area of study once you collect all of the possibilities.
Histone proteins can also be affected by methylation. Methylation and acetylation generally "closes" and "opens," respectively, DNA to proteins.
Bacteria, in comparison, use methylation to differentiate host DNA from foreign DNA. A number of restriction enzymes target non-methylated DNA and prevent viral infection in some bacteria.
Hope this info. helps you.