The inside of a tooth can become infected when that tooth incurs injury, like a deep cavity or crack. Infection creates pressure and pain. At this point, you can have the tooth removed or, in some cases, the tooth can be saved from extraction with root canal therapy.
Inside each of your teeth are canals that house a nerve, also called the pulp of the tooth. This nerve carries nutrients to the tooth and removes waste, sustaining life. When the nerve becomes infected, it will die, as will the tooth. However, the tooth might be salvageable.