Root canal treatment removes infected pulp from inside the tooth and seals it to prevent reinfection.