Root canals are needed when the nerve of a tooth is irreversibly damaged. This occurs from either decay or trauma.
When the nerve dies due to one of these the tooth then becomes the source that causes swelling, pain and infection. During a root canal, the inner chamber of the tooth is cleaned out, disinfected and then sealed off from the inside out to stop the infection and allow for healing.
If the infection is not corrected by having a root canal, potentially life threatening swellings due to infection can occur. The only alternative to root canal is extraction, so if the tooth can be saved, they are a great option!