It works with baking soda to make carbon dioxide bubbles to make the cake rise to make it airy and light. The vinegar also helps buttermilk create a silky crumb texture. It makes the cake soft and pillowy as well without adding any kind of strange flavor. Just a bit of tanginess. White vinegar is usually used but white wine vinegar or apple cider vinegar will work too. If vinegar is not available, use lemon or lime juice.