If you have tree roots growing into your sewer line you can pour some sodium chloride or copper sulfate, or even rock salt into the toilet and flush it down the drain.
These methods will dry out the tree roots and kill them.
You need to flush around 2 lbs of rock salt down the toilet for it to be effective.
Sometimes you may need to dig up the sewer line and cut the tree roots out and away from the sewer line and then even replace the broken section of sewer pipe.
If you have trees near the sewer pipe you need to dig up the roots going towards the sewer pipe and cut them off and then put some rock salt on the end of the root that you cut that was leading to the sewer pipe and it will kill the root off and prevent it from growing into the sewer pipe.