What will cause a 3 year old not to eat and when you make her eat she vomits after 2 bites?

Probably normal. Children don't like to be force fed just like grown ups. Just make sure you don't give junk foods, have regular meal times and watch her overall growth and development. If she is gaining weight she is getting adequate calories.
My guess. Could be anything, an ear infection, uti, pneumonia, stomach virus, allergies, throat infection, enlarged tonsils, reflux or eating the same food all over, body image(seeing herself as huge) etc . My guess, she could be constipated and impacted, therefore no more room for food. It could be very well any of the above, really need more info to help you out better.