There are a number of reasons why you might need a root canal treatment.
The most likely reason is due to the presence of decay - either new decay, or in a filled tooth that previously had considerable decay. The bacteria in the decay cause inflammation in the pulp ( this is the soft tissue in the middle of the tooth and root, made up of nerves and blood vessels ) If the inflammation is reversible ( usually short stings, particularly to temperature sensation ) then the pulp can recover and all that may be required is a restoration (filling).
If the inflammation is irreversible (usually long stings as a response to temperature, particularly heat) then the pulp will not recover. It may become symptom free for some time, but it will not recover and the symptoms will recur. The pulp will then die.
The treatment for irreversible inflammation is to have a root canal treatment - or alternatively to extract the tooth.