Root canal treatment is needed when a decay is left untreated for a long time and the infection gets into the root of the tooth. The dentist will need to treat the tooth to remove the pulp where the nerve is. This essentially leaves the tooth without feeling and it will lose its colour and go greyish, but it will remain in the socket and can be used for many more years.
This is better than the alternative of having it pulled out and missing the use of the tooth, which will impact your ability to chew food properly. And if the tooth is visible when you smile, you’ll have an unsightly gap there, so you’ll want to have a part-plate made to replace it and this will be a further expense, not to mention it takes a while to get used to having a plate.