Baking Soda and Baking Powder are not the same thing. Baking soda is also known as soda bicarb or bicarbonate of soda. Baking powder is a mixture of baking soda, an acid (cream of tartar) and cornstarch. They cannot be used interchangeably in a recipe.
Both are used as leavening or rising agents, however they work in different ways. Baking soda or soda bicarb is an alkaline salt that releases carbon dioxide when an acid along with some liquid is mixed with it and exposed to heat. Carbon dioxide makes the batter fluffy or the dough rise. Baking powder already has an acid mixed with it, and only requires a liquid and exposure to heat to generate carbon dioxide.
Hence, baking soda is used in a recipe where there is an acid (could be yoghurt, buttermilk, some fermented grain etc), and when goods are required to be baked brown. Baking powder is used in recipes where there is no acidic ingredient. Some recipes may use both baking soda and baking powder as the recipe batter may require an extra lift and one ingredient alone cannot create enough carbon dioxide to leaven the batter.