If you're bleeding in your upper portion of your digestive system this bleeding in the digestive system can cause black and tarry stools.
The bleeding in your digestive system is mostly caused by Ulcers or any other irritation of the esophagus and even the stomach which is known as gastritis.
If you're taking Iron Supplements or other medications that are bismuth based that can also cause black darkened stools.