It's really common for cats to vomit, and sometimes people don't think it's any big deal. But, the truth is, if your cat is vomiting frequently it's actually a problem and you shouldn't just blame it on hairballs (even though a lot of times there's hair in the vomit). The likely hood that something else is going on is actually pretty good. So, if your cat is vomiting more than once or twice a month, you should definitely address this with your veterinarian. It can be scary when you see a cat vomit if you've never seen in before but you usually they'll be just fine; just leave them alone so they can vomit and be done with it.
Then, definitely don't scold your cat! Cats don't vomit because they're angry with you; they don't know that it's a pain to clean the floor or that your cashmere sweater was expensive. Just take it out of the way and clean it appropriately. Now, things to think about for why your cat might vomit are that your cat might have a dietary problem. Many cats vomit simply because they don't tolerate the food that you're feeding them. There are many different prescription and non-prescription diets made for a cat like that. So, make sure to talk with your veterinarian about the options. Other cats may vomit because they have inflammation in their stomach or in their intestines.
This is something that can be diagnosed with your veterinarian and treated appropriately. In addition, some cats vomit because they have parasites. So, if you go to your veterinarian with a cat that's vomiting, it's really common for them to recommend a food trial of something that's not likely to cause troubles. As well, is an anti-parasitic medication. This helps treat for any parasites that might be present and causing your cat to have an upset stomach. If you do need to do further diagnostics, they may include ultrasounds or X-rays, or even what's called an endoscopy. During an endoscopy they actually send a tiny camera down into your cat's stomach and intestines and usually they take tiny tissue samples and send them to a lap to be evaluated for specific types in inflammation.
So, if your cat's vomiting, don't blow it off. Make sure to talk with your veterinarian; vomiting chronically is just not comfortable for them and can definitely cause or be a sign of further problems.