Burping releases gas that has built up in the body from swallowing air. You may not feel yourself doing it, but you swallow air all the time--especially while eating. Drinking soda, chewing gum, talking too quickly and drinking through a straw are other ways gas can get into the body.
Infants have difficulty coordinating breathing and swallowing, so they are especially prone to burping. Babies are often "burped," patted on the back to allow air to move to the top of the belly, after being fed to relieve the uncomfortable bloating caused by gas.