What Does Baking Soda Do In Cookies?

And how is it different from baking powder?