Cats can get stomach bugs just like us, that cause vomiting and/or diarrhea. They should pass within a day. You shouldn't feed a vomiting cat for 12 hours, and offer him ice cubes rather than water during that time period. If he vomits after eating when you resume feeding, it's time for a vet visit. But if any other symptoms develop, get him to the vet even before the 12 hours is up. You don't want to delay treatment for something that could be more serious than a passing virus.
A change in diet has to be pretty significant to cause vomiting in cats, usually. They're not as sensitive as dogs. So merely rotating flavors, etc., usually will not cause a problem.
Stomach problems from worms usually cause frothy vomit, and sometimes worms in the vomit, if you're lucky! Vomit from a virus or secondary to another illness is usually clear, frothy, or yellow/green. These are the most serious cases and can't be ignored. Watch cautiously, as you are, withhold the cat's food, and report to a vet if there's no improvement today.
Normally, if eating too fast is to blame, the cat will vomit up partially digested food. This is actually regurgitation and not vomiting. Regurgitation is not an emergency and doesn't require fasting. It's usually due to eating too fast or not chewing enough. The stomach can't handle all that digestion on its own. It needs the teeth and saliva to do their jobs first, so the stomach sends food back up to be properly broken down. Other times, there may be a faulty valve or poor muscle function that allows food to empty back into the esophagus from the stomach, or sometimes a dip in the esophagus can prevent food from even getting to the stomach. For regurgitation, the best treatment is to feed small portions of food several times a day to prevent gobbling. Canned food is best for these cats, or you should find a dry food with small pieces, so they'll be easier to digest. Also, raising the food dish will keep food going in the right direction if poor muscle function is to blame. If regurgitation continues, some heavy testing might be needed to get to the bottom of it.