Dogs are known to suffer diarrhoea from time to time from a variety of causes including stomach or intestinal bacteria or viruses, intestinal parasites, and dietary sensitivities or indiscretions such as scavenging rubbish or other offensive materials. This should not be a cause for concern but if there are other symptoms like vomiting, then you should consult a vet immediately.
You dog has taken something disagreeable or eaten too much. Diarrhea in dogs is a normal thing and needs a little attention to treat it at home. You should give your dog bland food like boiled hamburger with white rice. For more details about the treatment, check this answer