First, here's how they are alike: baking powder and baking soda are both leaveners: that is, both help baked goods rise.
Baking soda (bicarbonate of soda) is four times as strong as baking powder and is actually an ingredient in the more mild-mannered baking powder. To make baked goods rise, it's usually about 1/4 teaspoon of baking soda for 1 cup of flour, where it takes a full teaspoon of baking powder, according to food scientist Shirley Corriher. But it doesn't really work to just substitute one for the other in these amounts: the best choice really depends on the other ingredients in the recipe.
Baking soda is usually a better choice when the recipe includes acidic ingredients like buttermilk, yogurt, sour cream, citrus juice, molasses and brown sugar. Always mix it with your dry ingredients first: as soon as baking soda hits moisture, it begins to react. That's also why you don't let a batter made with baking soda stand–get it in the oven right away.
Baking powder is made from a combination of baking soda, an acid like cream of tartar, and cornstarch to absorb moisture. Baking powder is perishable and should be stored on a cool, dry place. (Check the expiration date on the can). To test if it is still good, add 1 teaspoon to 1/3 cup hot water–it should bubble up like it's at a party.
Recipe: Mummy's Brown Soda Bread