Baking soda is just pure sodium bicarbonate. It is bitter and will add a bitter taste to your recipe unless paired with an acidic ingredient (buttermilk, honey, yogurt.) Baking soda, combined with wet ingredients and an acidic ingredient, like chocolate in your chocolate chip cookies, will kick off the chemical reaction of producing carbon dioxide bubbles. Once you add in the heat from the oven, your cookies will "rise" as the carbon dioxide bubbles expand in the heat. Since the chemical reaction starts right away, you need to bake right away. If you leave dough sit for too long, your baked good will be flat. Baking soda is usually found in recipes for cookies.
Baking powder does contain sodium bicarbonate (yep, there is baking soda in your baking power.) But it also includes the "acidifying agent" (remember the chocolate?) in the form of cream of tartar. There is also starch that acts as a drying agent. Since it already has the acidifying agent in it, it will not be bitter if you fail to pair it properly with ingredients to balance it out. Baking powder gives you more time, as it can sit a little longer before being popped in the oven to bake. Recipes for cakes and biscuits usually call for baking powder.
Can you substitute in recipes?
You CAN substitute baking powder in place of baking soda. You will need more baking powder (2 to 3 times more) and it may affect the taste. You shouldn't use baking soda when a recipe calls for baking powder. Remember baking soda lacks the acidity and has to be paired with an acidic ingredient in order to get it to rise. In a pinch, you can make your own baking powder, by combining 2 parts cream of tartar to one part baking soda. Or if you're like me and bake a lot, just horde both baking powder and baking soda in your pantry!
How to test if your baking soda or baking powder are still good
Remember those baking soda volcanoes from elementary school? To test baking soda to see if it is still good, put some in a small bowl and add a little vinegar to it. If it bubbles up, it’s still good. The easiest way to test baking powder to see if it still works is to put some in a small bowl and add some water to it. If it foams up, it’s still good.
Now that you know which to use and why, go get baking!!!