This procedure is used to repair tooth decay (cavity). When a tooth has a cavity it can eventually become hazardous to a tooth after a period of time. This is because, if left untreated, a cavity can continue to grow. If decay reaches the pulp of your tooth it can damage it, resulting in a or of the tooth.