Of course, it may just be something simple like Pepto-Bismol, which has the unfortunate side effect of causing weird black poop (the same is true for other products that contain bismuth salicylate). Other benign causes of black poop are consuming black licorice, iron pills, or even blueberries.
Red poop is almost always alarming because for most people, red equals blood. And yes, sometimes that is the case, and the causes can vary wildly -- as Dr. Sam explains, it can be something as simple as hemorrhoids, or as serious as colon cancer. Inflammatory bowel disease, infection, and trauma can also cause red bleeding. Here again, though, there are less-serious potential causes -- copious amounts of beets and tomatoes can make your poop appear red, but your doctor can determine if your red poop is in fact blood or a byproduct of your favorite foods.