A Few Interesting Facts:
Baking soda and baking powder are leavening agents that are used in all types of desserts. This means that when mixed and baked, they make the baked goods rise by creating air bubbles.
Baking soda is sodium bicarbonate
For baking soda to do it’s job properly, it requires an acidic component, because the baking soda nuetralizes the acid & that causes the leavening. Some common acidic components found in dessert recipes include vinegar, lemon juice, buttermilk, brown sugar, and even chocolate. Baking soda should be used instead of baking powder if there is an acidic component in the recipe because it is more effective than baking powder.
Baking powder is baking soda mixed with something acidic like cream of tartar
Baking powder is generally used when the recipe does not already already contain an acid.
Baking soda also has a much longer shelf life than Baking powder. When a recipe calls for both, that is usually due to the fact that the recipe has some acid and needs to be neutralized by the baking soda, but not enough to do the total amount of leavening desired. The baking powder helps to make up the difference.