Cocoa Powder is the dry powder that remains after cocoa beans have been processed, with part of the cocoa butter removed. Natural cocoa is somewhat acidic; therefore it is possible to use baking soda (which reacts with acid) as part of the leavening agent when there’s cocoa powder in the mix.
Cocoa contains starch. Consequently, when cocoa is added to a mix (to change a yellow cake to a chocolate cake), you must reduce the flour quantity to compensate for this additional starch. There is a specific conversion rate, but for simplicity, you can just reduce the quantity of flour by the same amount as the quantity of cocoa powder added. The difference is negligible.