Many people make the mistake of thinking that these two leaveners (something that makes a baked product rise) are interchangeable, but they aren’t.
Baking soda is the main leavener used in baking, and is an alkaline substance. It requires something else in the recipe to be acidic in order for it to work. When baking soda (bicarbonate of soda) is combined with an acid in a recipe, say lemon juice or buttermilk, a chemical reaction takes place that produces carbon dioxide, which forms pockets of air in the batter. While baking, these pockets of air expand, causing the baked product to rise. At the same time, the flour, sugar and eggs are forming a structure around the air pockets. If there isn’t enough baking soda or acid in the recipe, the baked product won’t rise properly. If there is too much baking soda and acid, there will be larger air pockets and the structure formed by the eggs, sugar and flour won’t be able to support it: the cake or cookie will fall.
Baking powder is a mixture of baking soda and an acid, along with an inert substance that keeps the two from reacting in the container. Baking soda makes up only a small part of baking powder, so they cannot be substituted one for one. The main purpose of baking soda is to provide the acid for a recipe in the proper ratio for the reaction to take place.
If you change a recipe, it’s important that you replace acidic ingredients with other acids, and that you don’t use an acid in place of a non-acid ingredient, or you will throw off the balance of the recipe.

