If vomiting is done intentionally, then it breaks one’s fast. However, if it is done unintentionally, then the fasting remains valid.
In his well-known book Fiqh As-Sunnah, the late Sheikh Sayyed Sabiq states the following: If one is overcome and vomits unintentionally, then he does not have to make up the day later on or to perform the acts of expiation. Abu Hurayrah (may Allah be pleased with him) quoted the Prophet (peace and blessings be upon him) as saying: “Whoever is overcome and vomits is not to make up the day. However, the one vomits intentionally must make up the day.” (Reported by Ahmad, Abu Dawood, At-Tirmidhi, Ibn Majah, Ibn Hibban, Ad-Daraqutni, and Al-Hakim and the latter called it (authentic) Sahih.)
Imam Al-Khattabi says: “I do not know of any difference of opinion among the scholars on the point in question. If one vomits unintentionally, then he is not in need of making up the day, while one who vomits intentionally must make up the day later.