For molecular biology in mammals, DNA demethylation causes replacement of 5-methylcytosine (5mC) in a DNA sequence by cytosine (C) (see figure of 5mC and C). DNA demethylation can occur by an active process at the site of a 5mC in a DNA sequence or, in replicating cells, by preventing addition of methyl groups to DNA so that the replicated DNA will largely have cytosine in the DNA sequence (5mC will be diluted out).  
Methylated cytosine is frequently present in the linear DNA sequence where a cytosine is followed by a guanine in a 5 → 3 direction (a CpG site). In mammals, DNA methyltransferases (which add methyl groups to DNA bases) exhibit a strong sequence preference for cytosines at CpG sites. There appear to be more than 20 million CpG dinucleotides in the human genome (see genomic distribution). In mammals, on average, 70% to 80% of CpG cytosines are methylated, though the level of methylation varies with different tissues. Methylated cytosines often occur in groups or CpG islands within the promoter regions of genes, where such methylation may reduce or silence gene expression (see gene expression). Methylated cytosines in the gene body, however, are positively correlated with expression. 
Almost 100% DNA demethylation occurs by a combination of passive dilution and active enzymatic removal during the reprogramming that occurs in early embryogenesis and in gametogenesis. Another large demethylation, of about 3% of all genes, can occur by active demethylation in neurons during formation of a strong memory. After surgery, demethylations are found in peripheral blood mononuclear cells at sites annotated to immune system genes. Demethylations also occur during the formation of cancers. During global DNA hypomethylation of tumor genomes, there is a minor to moderate reduction of the number of methylated cytosines (5mC) amounting to a loss of about 5% to 20% on average of the 5mC bases.