cat throwing up

She has problems with throwing up too often, and I've went to the vet for it. They give her anti nausea and an appetite stimulant, which is great for about a week. Recently, she has been throwing up white foam and that's it, keeping the food down. Why could she be doing this?