Your teeth are similar to most other organs in the body - they are living tissue. 
The enamel is a strong crystalline structure which is the part you see when you look in your mouth. The dentin is a softer material underneath the enamel. Inside the center of the tooth is the pulp chamber and running down the center of the roots of the tooth are the root canals. The pulp chamber and root canals contain nerves which provide sensation and blood vessels which supply nutrients to the tooth.
If decay is allowed to progress until it reaches the pulp chamber, the nerves and blood vessels become infected. The infected blood vessels in the pulp chamber and root canals can no longer provide nutrients to the tooth or fight the infection. As this infection continues, an abscess forms at the ends of the roots. This abscess causes bone destruction and can spread to other areas of the head.
The treatment for an infected tooth is to remove the infected tissue from the pulp chamber and root canals and to fill the area with a filling material. This procedure is commonly called a root canal. Dentists call it an endodontic procedure.

A tooth which has been endodontically treated (root canal), should have a crown (cap). The access opening into the tooth, which is necessary to do the root canal procedure, can leave the tooth weakened and susceptible to fracture. A crown protects the tooth against fracture.
It is best to avoid root canal procedures by having cavities filled before they infect the pulp chamber. If you do need a root canal, don't be afraid. The majority of root canal procedures are no more painful than a filling.