Toilet bowls can develop stains of many colors, but few are as unappealing as yellow ones. You're especially likely to find these stains on older toilets, and for a reason -- they take time to develop. These aren't organic stains that result from normal use of the toilet, but mineral deposits from the water supply. Because of this, you can't simply wash them off -- removal requires acidic chemicals and some energy expenditure on your part.
The brownish to yellowish stains on the sides of your toilet bowl are mineral deposits from hard water -- the minerals responsible are usually iron or manganese. The reason you see the stains only above the water line is because they are left behind when water evaporates, and they slowly accumulate on the porcelain -- which is more porous than it appears. The water in the bowl may also have a yellowish tinge, but that is usually from tannins in the water. You ingest tannins every time you drink coffee or tea, so they're nothing to worry about in your toilet. The minerals are a different matter, though.
The deposits that collect on the inside of your toilet are salts, and acids dissolve salts. Whether you need a strong acid or merely a moderately strong one depends on the condition of your toilet. Vinegar is a moderately strong acid that will do the job -- if somewhat slowly. If you want to call in the big guns, you need muriatic acid; that's another name for diluted hydrochloric acid -- which can be dangerously corrosive in high concentrations. Most commercial toilet cleaning products are somewhere in between these extremes. If you opt for one of these cleaning products, be sure one of its active ingredients is an acid.
The cleaning procedure depends largely on which product you're using, but it should always include rubber gloves, eye protection and plenty of ventilation. Begin by flushing the toilet manually: fill a 5-gallon bucket about half-full with water and dump it quickly into the bowl; this flushes the toilet without having to pull the lever, and the bowl won't refill, so you can have direct access to the stains.
If you aren't in a hurry, soak rags with full strength vinegar; arrange them around the inside of the bowl and leave them for several hours. When the stains begin to dissolve, scrub them vigorously with a stiff scrub brush -- a toilet brush is ideal. Repeat as needed, and finish up by spraying vinegar directly in the bowl and scrubbing off the most stubborn of the stains.
Before using a toilet cleaner that contains muriatic acid, be sure the water in the bowl is bleach-free -- if you use blue disinfectant, flush with buckets of clear water until the bowl water is clear, and wear a respirator for safety. Mixing acid and bleach creates a highly toxic gas.
Pour the acidic cleaner on the porcelain and on your synthetic-bristle brush, and scrub away. Don't use a wire brush or steel wool for scrubbing -- both can scratch the porcelain. Flush with plenty of clear water when you're done. If you want to avoid the same ordeal next year, scrub the bowl once a week with a toilet brush. That simple maintenance procedure prevents mineral deposits from accumulating, even if you don't use bowl cleaner.