There are a number of possible causes of pain after the completion of a root canal. After a root canal is completed no living pulp tissue remains inside the tooth, but nerve endings remain in the ligaments that attach the tooth to the surrounding bone. These ligaments have nerve fiber associated with them that can feel pain. They are the source of any post root canal pain.
One possible cause of pain are numerous and include inflammation of the periapical tissues post root canal. This inflammation may be due to extruded sealer or 'over instrumentation during the endodontic procedure. Sometimes the root canal files go past the apical terminus and can either inject some debris periapically or just damage the ligaments. This inflammation usually resolves by itself given enough time.
Another source of post root canal discomfort is a high bite and this can easily be corrected by a dentist. If a patient bites down, with no food in their mouth and their root canaled tooth hurts, then the bite should be adjusted. Teeth undergoing root canals should be not be in a heavy occlusion.
Other possible causes of pain are a persistent infection or a root fracture. If a root canal is completed, but an infection still is present around the periapical area then a retreatment may be indicated especially if significant time has gone by without a resolution of the infection. Sometimes an infection can be caused by a fracture of the tooth in question and in that case the tooth usually has a hopeless prognosis and requires extraction.
It is also possible, but not as common that persistent pain exists due to a sensitization of a nerve ganglion We have all heard of 'phantom limb pain'. This a similar phenomenon. Some of these patients can have pain even after the offending tooth is removed.