Dogs will vomit when they have eaten something that the stomach doesn't like. Examples: eating grass will sometimes do it. My dog does it if I feed him more than a small scrap of potato peel. The key...
There can be several common reasons for his/her current upset stomach. Did you recently switch his dog food to an entirely different kind? The quick transition may have been too abrupt for his...
try anything like a bone or meat or even maybe some disgusting medicine from the chemist may have to use a medicine syringe as it isn't something dogs enjoy eating.
There is no happy reason this would happen, and I don't want to guess at the myriad causes, all grim. Get this dog to a vet this very instant. Bleeiding out happens FAST.