Cats vomit for a range of reasons, and to treat your cat's vomiting you need to determine why he/she is doing it. It can be caused by eating too much too fast, hairballs, stress, eating unfamiliar objects or poisons, or more serious reasons. If you think your cat is ill, take him/her to the veterinarian immediately.
Hairballs form in the stomach and can cause a cat's food to come back up after consuming it. You won't of necessity see hair in the vomit, but it could still be a reason. To stop this, invest in a tube of hairball prevention gel and feed it to your feline as directed on the bottle. After a while, the hairballs will stop developing and your cat will quit vomiting. There are also special hairball elimination foods available.
Your feline may be eating too much or too fast. If you believe he/she is eating too much, put less food in his/her bowl and feed him/her more often. If you have other cats, he/she may be eating too hurriedly because kitty feels that the other cats will get all of the food. You can keep his/her food separate from the other felines in a nice quiet place where kitty can feel more secure and eat at a slower pace.
If something changes in the family circle such as the arrival of another pet or even person, your cat may become filled with anxiety... This can distress his/her stomach and cause him/her to vomit. Try to find the foundation of the anxiety and find a resolution to put kitty at ease. Give him/her his/her own space to go to when tension arises. Give kitty extra one-on-one attention to make him/her feel comfortable and at ease.
Your cat could also be eating things around the house that are bad for him/her. Keep an eye on what kitty chows on, such as strings or tiny objects and try to keep kitty away from them. Keep all poisonous things, such as cleaners and certain plants far from his/her reach. If you discover your cat eating grass, he/she's more than likely trying to get rid of a hairball and will vomit subsequently.
Your cat may also have a medical problem and if nothing else works, take him/her to the veterinarian for tests. A veterinarian will perform blood work to see if there are any toxins. Parasites and viruses can also be the grounds for vomiting. Your trusted veterinarian will know what to look for and what to do if any of these is the source of the vomiting and soon kitty will be back to normal.