Let's say you're making a cake. The recipe calls for baking powder, but you've just run out. Can you substitute baking soda? What's the difference between the two, anyway?
Let's start with baking soda, a basic chemical that's just itching to react with an acid. When you combine baking soda with an acid like vinegar or buttermilk, the mixture fizzes. That's a chemical reaction, producing bubbles of carbon dioxide gas. These bubbles of carbon dioxide make baked goods light and fluffy, by lifting the batter as it bakes.
Baking powder works in a similar way because it contains baking soda. The difference is that baking powder also has its own, powdered acid. Since baking powder contains both the acid and base necessary for the chemical reaction, why doesn't it fizz in your cabinet? The trick is that the powdered acid is inactive until you add water, then the fizzing begins!
Baking soda and powder both produce bubbles of carbon dioxide to make baked goods light and fluffy, but because baking powder has its own acid, and baking soda needs another ingredient to supply acid, you can't just substitute one for the other in a recipe. You can see the difference with this simple experiment. Put a spoonful of baking soda in a cup, then add water. What happens? Not much.
Now put baking powder in another cup and add water. This activates the acid and the mixture fizzes carbon dioxide. To make the baking soda fizz, you'll need to supply the acid. Add some vinegar, and voila! the reaction begins.