Toilets are far more durable than you think and can last over 50 years. So, the answer is essentially that the toilet itself will not ever wear out.
The design of the toilet itself is as simple as it gets so there is nothing that goes bad. The inside of the tank has a lot of parts that need to be replaced however. Those are usually cheap, like the lever and flapper.
The bowl itself can get cracked, however. In this case it should be replaced immediately as there is no fix for that.
So, if your toilet is very old but otherwise working fine and has no signs of damage, then you are fine.
If you are experiencing weak flushes, frequent clogging or bad odors, then keep reading as it may need to be replaced.