Contrary to urban legend, Root Canal Therapy, or RCT as it is commonly known, is painless and relatively non-invasive. It is required when the nerve of a tooth dies, often as a result of trauma, caries, cracks, tooth grinding or injury. It is done under local anaesthetic over at least two appointments, dependent on the tooth involved.
At the first appointment the nerve of the tooth is removed and the root canal cleaned out. At the second appointment, the canal is cleaned again and filled with a product to stabilise the canal and leave it in a solid state. X-rays are taken at each appointment to ensure the base of the canal is reached. Finally, a definitive restoration is placed in/on the tooth. This may be a filling or a crown, dependent on the amount of tooth involved.
A tooth which has had nerve damage and not undergone RCT, will quite likely in time discolour and cause further problems.