Dear student
Baking powder (NaHCO3) is mixed with the flour. When water is added to this flour to make dough, baking powder undergoes a chemical reaction during which carbon dioxide gas is produced. This carbon dioxide gas gets trapped into the dough and bubbles out which causes the cake to rise making it soft and spongy.
NaHCO3+ H+ + heat --> CO2 + H2O + Sodium Salt of tartaric acid
Regards