Baking soda and baking powder are both leavening agents meaning when added to batter or dough before baking, produce air bubbles and helps it to rise.
Baking soda consists mainly of sodium bi-carbonate. At high temperature baking soda is unstable on its own and so is preferred in recipes for pancakes and cookies. It needs to be mixed with moisture and acidic substances like sugar, milk, buttermilk, curd or honey in order to undergo a chemical reaction causing it to rise.
Baking powder on the other hand is a mixture of sodium bi-carbonate, cream of tartar (acidic substances) and drying agent (starch). When baking powder is mixed in a batter the leavening agent produces air bubbles (CO2) and causes it to rise.