If your doctor has suggested root canal treatment, it means your tooth cavity(caries) has gone deep into the layer called pulp. Pulp contains the blood vessels and nerve Fibres of the tooth. So when a caries has reached pulp it spreads and causes pain. This cannot be cured with normal restoration. The infected pulp is taken out, canals are cleaned and filled with restorative material. It takes about 4 sittings to complete the whole treatment or you can talk to your doctor about single visit rct.
Next Steps
Talk to your dentist, and tell them to kindly explain you the procedure.