Baby throwing up

I was wondering why my baby sometimes throws up when I burp him. As soon as he burps throw up comes out, am I doing something wrong ? He has a doctors appointment on Thursday and will be mentioning it to him.