Baking soda is a base, and vinegar is an acid. When mixed together, they create an acid/base reaction that produces carbon dioxide, water, and sodium acetate. This reaction causes bubbles and fizz.
The carbon dioxide produced from the reaction cannot escape and is trapped inside the sealed bag. Since the ziplock bag is plastic, it will expand as the gas molecules fill the bag. When it reaches its limit and the bag cannot hold anymore CO2, it will pop.