The most common case in which endodontics is performed is the appearance of pain due to nerve involvement. It is usually intimately related to cavities at the precise moment of reaching the nerve.
With the endodontics, the inside of the tooth is cleansed, eliminating any hint of infection. With the clean tooth you can proceed in conditions to the restoration of it, if necessary.
There are other cases in which there is no pain, however a preventive endodontics is required or in other special cases