What are the black spots, rings, or lines in toilets and shower stalls?

What are the black spots, rings, or lines in toilets and shower stalls?

Mold and mildew grows in places that are continually damp and is treated the same as the pink slime.