Dentin is the hard, yellowish tissue that makes up the bulk of teeth beneath the enamel. It encloses the dental pulp and is covered by enamel on the crown and cementum on the root. Dentin is composed primarily of hydroxyapatite crystals and collagen fibers, making it harder than bone but softer than enamel. It contains dentinal tubules that extend from the pulp cavity to the outer surface and contain odontoblastic processes and nerves. There are three types of dentin: primary, secondary, and tertiary, which differ in their rates of formation and permeability. Dentin functions to protect the pulp, affect enamel color, absorb shock, and determine tooth shape.