Roots always want to seek water and any moist areas and when your sewer line gets a crack in it then that can lead to water seepage which then attracts the roots.
The roots will then grow through the crack in your sewer line and break your sewer line even more.
The roots can also grow through the joints where the sewer line connects if someone doesn't glue the sewer lines together at the joints like they should.
You can kill roots in a sewer line by flushing some rock salt down your sewer line which can dry out and kill the roots in your sewer line.
But if the roots have done severe damage to your sewer line then you may need to replace the entire sewer line.