Dark-colored stools may result from foods you eat (like a lot of spinach), substances (like peptobismol), but most significantly suggest bleeding.
When blood is denatured by the acid in your stomach, as from ulcers, your stools will turn tarry ("melena
"). Blood may ingested from nose bleeds
, bleeding gums, etc. But persistent melena is a "red flag" warning for which you need fast medical care.