An acid base reaction occurs since we know that vinagar is just acetic acid and baking soda is just sodium bicarbonate. The vinagar (weak acid) is going to react with the bicarbonate (weak base) to create carbonic acid which decomposes into carbon dioxide and water. I hope this helps. Let me know in the comments if anything is unclear.