Hello and welcome to HCM.
Black or dark brown stools are called melena. They are a sign of upper gastrointestinal tract bleed. As a bleed from the upper GIT moves down it mixes with the stool being formed, giving it a distinctive dark brown or black color.
You will have to consult a doctor, preferably a gastroenterologist who will conduct an endoscopy
to help find the cause and site of bleed. Please do this at the earliest.
I hope this helps. Feel free to write back to any time for any further clarifications.