In the pipe, or around the outside of the pipe and then down into the pipe? The latter is more common, and you have to cut as much of the root as possible down into the floor, and then flood the recess around the pipe with a root killer and water solution. Then fill the void with root killer crystals or salt. It is not a permanent solution, but will usually last for a couple of years before it needs to be done again. Removing the tree(s), if you can determine where the roots are coming from, is ineffective, since the roots will continue to grow for 25 years after the tree is cut down.