What are the right techniques to burp babies?

Head up. Tummy gas needs a chance to come up and be vented. Gravity will hold the feed down and with the head upright, it is only a matter of time. Baby will swallow a bit of spit now & then , unfolding the stomach entrance & allowing air to vent if properly positioned. I like to hold baby up on my forearm facing out, cradeling his/her chest with my hand, head up. A pat on the back is not always needed.
Ways to burp. First, reassure yourself there is not really a "wrong way". There may be different ways that work better for one infant than for another. My favorite, though, is to set the baby on your thighsideways, with one hand gently around the abdomen and the thumb and first finger of that hand supporting the chin/nech. Then with the other hand gently pat and "squeeze "oh so gently" the abdomen as you pat.