There are two main types of cocoa powder. Natural cocoa powder is produced using the process below, and is very strong, slightly acidic, and very dark. Dutch cocoa powder is produced by adding an alkali to the press cake to mellow the flavour and make the colour less intense.
The powder is obtained from cocoa solids, one of the two components of chocolate liquor. These beans are harvested in large pods which are split open and then allowed to ferment, mellowing the natural bitterness, after which they are then roasted and hulled to expose the nibs, which are then ground to produce chocolate liquor, a gritty, runny paste which is the first step in creating a dizzying array of chocolate products.
Once the nibs have been ground into chocolate liquor, the chocolate liquor is pressed to squeeze out the rich cocoa butter. The pressing separates the chocolate liquor into two components: cocoa butter, and cocoa solids.
To produce cocoa powder, the cocoa solids are pressed again, ensuring that around 75% of the original cocoa butter has been removed, and creating a substance called press cake. The press cake is dried, and then ground into cocoa powder.
The dried powder formed from chocolate liquor after the cocoa butter has been removed. This mixture is then dried and ground into a fine powder. Dutch process cocoa has been treated with alkali to give a darker appearance and less bitter taste. Instant cocoa has sugar, milk solids, and other flavourings and emulsifiers added to it which aides it to dissolve more readily - you can find more information here.