As your baby's muscles develop and get stronger, your baby will be able to keep food in his belly. Most babies stop spitting up by around 6 or 7 months of age, or once they learn to sit up on their own, but a few will continue until their first birthday.
Vomiting is usually more forceful and of greater quantity than if your baby is just spitting up some of his latest meal. If your baby seems distressed, he's probably vomiting. Spitting up doesn't faze most babies at all.
Spitting up is usually just par for the parenting course, but if your baby isn't gaining weight as he should be, schedule a visit with his doctor.
Call your doctor immediately if your baby begins projectile vomiting. Projectile vomiting is when the vomit flies out of a baby's mouth forcefully — shooting across the room, for example. This could be a sign of a condition called pyloric stenosis, in which the muscles at the bottom of the stomach thicken and prevent the flow of food to the small intestine. This typically happens at about 1 month of age.
Also phone your doctor right away if you see green bile in your baby's vomit. This could be a sign of a blockage in your baby's intestines, which would require a visit to the emergency room, a scan, and possibly emergency surgery.