Both baking soda and baking powder are leavening agents, which means they are added to baked goods before cooking to produce carbon dioxide and cause them to 'rise'. Baking powder actually contains baking soda, but the two substances are used under different conditions.
Baking soda is pure sodium bicarbonate.
Baking powder contains sodium bicarbonate, but it includes the acidifying agent already (cream of tartar), and also a drying agent (usually starch).
Both can be used for the same propose in cooking and baking.