Endodontics is a branch of dentistry that focuses on treating the internal tissues of the tooth, primarily the root canals. The main goal of endodontic treatment is to save the tooth even when its nerve (pulp) is affected by inflammation or infection.