Root canal treatment, or endodontics, is performed when the pulp of the tooth, which contains nerves and blood vessels, becomes infected or damaged. This procedure involves removing the infected tissue, preventing further decay, and preserving the tooth. Endodontic treatment can save teeth that would otherwise need to be extracted.