The process whose specific outcome is the formation of dentin, the mineralized tissue that constitutes the major bulk of teeth. Dentin may be one of three types: primary dentin, secondary dentin, and tertiary dentin.