If you have ever attempted to substitute baking soda for baking powder only to find undesired results, then you know that these two compounds aren't exactly the same. Despite the similar names and similar actions (both are leavening agents), baking soda and baking powder are chemically different.
Baking soda is made from sodium bicarbonate. This basic chemical reacts with acids, such as buttermilk, yogurt or vinegar, and produces carbon dioxide (CO2). The CO2 forms as bubbles, which help the resulting dough or batter rise.
By contrast, baking powder contains both baking soda (sodium bicarbonate) plus two other ingredients: monocalcium phosphate and sodium acid pyrophosphate or sodium aluminum sulfate. In short, the addition of two acids in baking powder extends the leavening process - the rising reaction doesn't complete until the product is in the oven. This is good news for when you want fluffy cakes and muffins.
So next time, pay attention to the recipe and don't try to substitute one baking ingredient for another - it just won't work!