In a nutshell - baking soda when the recipe you are making as an acidic ingredient; baking powder for when the recipe doesn't have an acidic ingredient because the baking powder has an acid compound in it. The acid is what causes the bubbles, which causes rising. But read below for a more detailed explanation and an explanation for when your recipe has heavier ingredients in it like raisins, nuts, berries, etc.
You want to use baking soda (bicarbonate of soda) as a leavener in baked goods when you also have an acid in the recipe like sour cream, lemon juice, molases, buttermilk, yogurt, etc. As opposed to baking powder, which has the acid in it's contents, so no acid is required to cause the bubbles when using baking powder. Thus, when your recipe has an acid, like one of the above-mentioned, in the recipe, then the reaction will occur with just the baking soda. The interaction of the baking soda with an acid causes carbon dioxide gas bubbles and helps the dough or batter rise.
When using baking soda you want to cook the product right away because as the soda hits the acid gas bubbles start forming right away. To wait would cause the gas bubbles to "deflate", therefore, things will not rise properly.
As to how much baking soda to use - mmmmmm.. I'm not really sure except that I know the more acidic your ingredients the less baking soda you have to use. If I were you I would start looking at recipes to determine this. Also, pay attention to the ingredients - the heavier the ingredients the more you use.
Just remember that you can't use baking soda in place of baking powder without something acidic to react to it. Without something to neutralize it, it will leave a bitter, salty taste. And always blend either one thoroughly into your dry ingredients first and make sure they are not in lumps so it will be evenly distributed throughout the dough or batter. There's nothing worse than biting into a chunk of baking powder! YUCK - I know this for a fact LOL. Use a spoon and a fine-mesh seive to make sure lumps are gone.
Double acting baking powder, which is the most common kind of baking powder, already has baking soda in it, as well as an acid (usually cream of tartar). So it only needs liquid and starch to create the leavening. But it is a two-step rising process.
When using baking powder the first process takes place when the liquid is added. The second process takes place when heat is added. Therefore, you can mix the product and wait to finish cooking. Then the second stage (the cooking stage) will finish the process.
You'll need 1 teaspoon of baking powder for each cup of flour. But if your recipe has heavy ingredients in it, like raisins, nuts, etc. you need extra help lifting those raisins and other things so you'll want an extra 1/2 teaspoon of baking powder per cup of flour.
Like someone told me - to really get an idea of how each works make a small recipe, divided, using each one and see the results.
I hope this has helped some - good luck.
"Count yourself...you ain't so many" - quote from Buck's Daddy