DNA methylation at the 5-position of cytosine (5mC) plays vital roles in mammalian development. DNA methylation is catalyzed by DNA methyltransferases (DNMTs), and the two DNMT families, DNMT3 and DNMT1, are responsible for methylation establishment and maintenance, respectively. Since their discovery, biochemical and structural studies have revealed the key mechanisms underlying how DNMTs catalyze de novo and maintenance DNA methylation. In particular, recent development of low-input genomic and epigenomic technologies has deepened our understanding of DNA methylation regulation in germ lines and early stage embryos. In this review, we first describe the methylation machinery including the DNMTs and their essential cofactors. We then discuss how DNMTs are recruited to or excluded from certain genomic elements. Lastly, we summarize recent understanding of the regulation of DNA methylation dynamics in mammalian germ lines and early embryos with a focus on both mice and humans.