Occasionally a black ring will start to appear around the base of your toilet. This is often a sign that the wax seal on the toilet is damaged. When the wax seal is damaged, bacteria and sewage start to seep out around the toilet. The black ring you see is from the mold, bacteria, and sewage.
Fixing a damaged wax seal on a toilet is a complex process. The toilet must first be removed, the old wax seal removed, and a new one placed. An experienced plumber will be able to determine why the black ring is forming and how best to fix it.