This happens because of inadequate burping during milk feeding. At this case the baby takes in a good amount of air which needs to get removed from the stomach before putting him/her off to bed in a lie-down position. When the baby after milk feeding is this position, he/she vomits out the some amount of fermented milk from its stomach which looks like curd when out from the body.
Hope this clarifies...