That surprises me. Toilets these days are made of vitreous porcelain, i.e. they're non-porous, and are covered with an impermeable high-temperature glaze, fired to around 1200C (not like steel baths which are enamelled at a lower temperature, say around 900C). Even if the integrity of the glaze is compromised, cracked or chipped for example, the underlying ceramic shouldn't absorb stains. The exceptions are old toilets made say pre-WW2 which were earthenware and porous, and the glaze could/would craze and allow water and stain to penetrate into the underlying ceramic.
Virtually all staining is on the glaze surface, either deposits of lime scale that become discoloured, or deposits of iron hydroxides arising from water that has picked up iron from old iron pipes. I would be very cautious about using strong chemicals such as caustic soda or strong acid to remove the staining. Both are capable of etching the glaze and potentially making the problem worse in the longer term, especially caustic soda. I would try some standard lime scale remover first. If that doesn't work, strong bleach, or even hydrogen peroxide, left for a few hours should deal with any organic staining. Only if these fail would I try stronger chemicals, but be very careful when handling them as they can cause burns, and if they get in your eyes will damage them or even cause blindness. Wear rubber gloves and goggles. Concentrated sulphuric acid reacts violently with water so if you do use it, make sure the trap/U-bend is empty and quite dry. Give some thought as to how you're going to get the chemical out of the bowl after you've used it. Simply flushing it away may have unexpected and violent results.