After the ripe pod has been cut from the tree, it is opened, the rind is discarded, and the pulp and seeds are piled or laid out on the ground for several days. During this time the pulp liquifies - this is called sweating - and a process known as fermentation takes place, which causes the beans to lose bitterness. This is followed by roasting, which can be done in different ways, for instance by drying the beans in the sun, but also on low heat above a wood fire. Fermentation and roasting have a large influence on the taste of the cocoa, and both processes have to be done in the right way to ensure that the cocoa flavour develops fully. It is also important to note that the beans are called cacao beans when they come out of the pod, but cocoa beans after fermenting and being roasted. Inside the bean is the cocoa nib, as well as the germ. A winnowing machine or nibber is used to remove the shells of the bean and the germ, leaving only the nib.
In some cases the nibs are dutched which means that alkali (e.g. potassium carbonate) are added. The purpose is to make the cocoa less acidic and more easily soluble in water. It also makes the flavour more mellow, though some argue that flavours are lost through this process. If cocoa has been treated this way, one can tell by looking whether the ingredients include alkali.
The next step is to mill the nibs which gives cocoa liquor. This substance consists of cocoa particles suspended in cocoa butter. If the manufacturer is blending different beans, this is the point at which it is done.
The cocoa liquor is pressed to extract the cocoa butter. What is left behind is called a presscake, which is pulverized into cocoa powder.
Chocolate is made by combining cocoa liquor and cocoa butter and adding other ingredients, which can include sugar, milk, emulsifying agent and additional flavourings. The mixture is then refined by rolling it into a smooth paste. In addition a kneading process known as conching improves the flavour and texture of the chocolate. After several periods of heating and cooling to prevent crystallization of the cocoa butter the mixture is finally poured into moulds and cooled, giving us the chocolate bar.