You may notice some black scum falling down the side of your toilet's bowl, but on closer inspection, you may see some growing under the rim as well. Using a mirror, you can see the full extent of the black scum growth under the toilet's rim. Knowing the cause of this can help you figure out how to get rid of it.
Mineral deposits gather in your toilet bowl over time, especially if your house has hard water. These deposits show as yellow or white in the bowl at first. Over time, the mineral deposits grow larger and can turn different colours. While the mineral deposits themselves won't turn black, they attract other things that coat the deposits in black.
Mildew grows on shower curtains, bathroom walls and in tile grout where moisture is prevalent. Opening a window and running the bathroom's fan after you take a bath or shower helps reduce or stop mildew growth in your bathroom. Mildew latches onto the mineral deposits in the toilet bowl, where there is enough moisture to keep the mildew growing. Scrubbing the bowl with vinegar or even muriatic acid removes the mineral deposits and the mildew at the same time.
Mold grows in wet environments as well, making the toilet bowl an ideal place. Like mildew, the mould latches onto the mineral deposits under the toilet's rim. Vinegar and muriatic acid can help eliminate the mineral deposits. Depending on how extensive the deposits are, you may need to pour the vinegar or muriatic acid down the overflow tube in the toilet's tank so it flows out of the holes under the toilet bowl's rim. Cleaning with bleach after you have rinsed all of the muriatic acid or vinegar out of the bowl kills the leftover mould.
Microorganisms live in the sewage pipes, feeding off of human waste and other debris. These microorganisms invade your home's drain pipes, but normally they stay below the curving trap in the toilet's drain. Occasionally the microorganisms make their way through the trap and into the toilet's bowl, where they take up residence under the rim. The microorganisms produce an offensive smell similar to the sewer. Pouring bleach down the overflow tube in the tank, allowing the bleach to drain out of the holes under the toilet's rim, gets rid of the microorganisms.