Vomiting is the involuntary ejection of the stomach contents. An episode of vomiting will generally resolve by itself 6 to 24 hours after it starts. So most babies shouldn't need any particular medical treatment, however it is important to ensure that they receive plenty of fluid during this time to avoid dehydration.
A food allergy such as Cow’s Milk Protein Allergy (CMPA) may also be responsible for your baby’s vomiting. Almost 50% of babies with CMPA experience vomiting as a symptom.