sounds like round worms, but I've never heard of a dog vomiting them.....
worms are very common, especially in puppies. Most pups are actually born with them already and the vet will usually deworm them at their first puppy visit. They can get them from many things--eating poop infected with them, fleas/flys laying eggs in their food, etc. Definitely get to the vet; its easy to get rid of them, but they can take up alot of your puppies nutrition if they are left untreated.