I've had on again off again stomach aches since Tuesday. Thursday I started having diarrhea and it's color is dark green/black. What is the reason?

Gastroenteritis. You probably have a viral gastroenteritis .You need to drink clear liquids to prevent dehydration and you may use Imodium (loperamide) to control diarrhea. If no better see your doctor or go to ER Other possibilities are Bacterial Gastroenteriti due to E Coli,Shigella.Salmonela and others or if you have travelled abroad parasite like Giardia or Ameba.