Remethylation primarily occurs through the action of enzymes known as DNA methyltransferases (DNMTs). These enzymes transfer a methyl group from S-adenosylmethionine (SAM) to the 5-carbon of the cytosine ring in DNA, converting cytosine to 5-methylcytosine. Histone methylation is carried out by histone methyltransferases (HMTs), which can add methyl groups to specific lysine or arginine residues on histone proteins.