You toilet drains to either a 3" or 4" sewer pipe which usually leads out to the main sewer line.
Your sink drains, shower drains, washing machine drain lines etc all lead to that main sewer line which is usually connected to the sewer pipe your toilet is connected too.
My toilet drains into a 4" sewer pipe and all my other sink, washing machine and other drain lines lead to that same connection at the toilet and drains out to the main sewer line after that.