Baking Soda is the household name for sodium bicarbonate (NaHCO3). Baking soda has an abundance of uses, but in baking it is used as a chemical leavener that causes baked goods to rise. The main mechanism used by baking soda in leavening is the production of carbon dioxide. The CO2 either creates bubbles in a mixture (as in muffin method mixing) or expands preexisting holes in the batter/dough (creaming method or kneading).
The exact mechanism for this reaction is debatable, but common consensus is that baking soda is a base (ph 9) which reacts to an acid in the mixture to produce carbon dioxide. This is plausible explanation, but several questions are left unanswered. Why does the reaction not occur as soon as all ingredients are mixed? Why is it possible to leave a mixture to rest overnight? When cookie dough is in the oven, why do all of the individual cookies double in size simultaneously after a few minutes, rather than as soon as they are placed in the oven?
The mechanism for baking soda, that I believe to be true, in baking is thermal decomposition. In the presence of water, at around 123°F baking soda gradually breaks down into carbon dioxide. As the temperature increases, the speed of this thermal decomposition increases exponentially. This theory explains why cookie dough doubles in size a few minutes after it is placed in the oven and why mixtures can still rise even when left to rest overnight.
I designed a simple experiment to determine which mechanism is the cause of leavening. The results favored thermal decomposition. A write-up of this experiment is under my Baking Soda Pop post in the Alchemist Notes section.