Reparative dentin is a natural defense mechanism of the tooth, forming in response to injury or decay to protect the pulp. It is produced by odontoblasts or newly differentiated cells from the pulp, serving as a barrier against further damage and bacterial invasion.