The inside of each tooth is filled with "pulp", which carries the tooth's blood supply and nerves. If bacteria gain access to the pulp, through a fracture or deep cavity, the pulp may become infected, leading to pain and a risk of tooth loss.
In a root canal, your dentist will remove the infected pulp and replace it with a rubber sealant. The tooth is then covered with a protective crown, which reinforces the tooth against future fractures and enhances the tooth's appearance. Root canals have an extremely high success rate in saving teeth that would otherwise be lost to infection.
The only alternative to root canal therapy is tooth extraction.