If this has been going on for more than a day, you need to go to the vet. Period. If it's just a few times, it could be for any number of "innocent reasons". Eating too quickly can case vomiting. Eating too much can cause an upchuck. Sometimes a dog's stomach is just upset.