What is the difference between dark, milk and white chocolate?
The difference is what proportion of the bar is cocoa solids, cocoa butter, milk and sugar.
Chocolate begins as cocoa beans, which are fermented, roasted and ground into a paste. That paste separates into two components: cocoa solids, which carry the chocolate flavour and colour, and cocoa butter, the fat, which carries texture and melt.
Dark chocolate contains cocoa solids, cocoa butter and sugar, with no milk. The percentage on the label — 70%, 85% — is the total proportion from the cocoa bean, solids and butter combined. A higher percentage means less sugar and generally more bitterness, but it does not straightforwardly mean better; the ratio of solids to butter varies between makers at the same percentage.
Milk chocolate adds milk solids and usually more sugar, and has a lower cocoa content — typically 20–40%. The milk softens the bitterness and changes the texture.
White chocolate contains cocoa butter, milk and sugar but no cocoa solids at all. This is why it is pale, why it tastes of cream and vanilla rather than chocolate, and why some people argue it is not chocolate. Legally it usually is, provided it contains a minimum proportion of cocoa butter — cheap versions substitute vegetable fat and cannot be labelled white chocolate in many jurisdictions.
Ruby chocolate is a more recent fourth type, made from specially processed beans, pink and slightly tart.
In cooking they are not interchangeable. White and milk chocolate have more sugar and milk solids, so they burn and seize more readily and need gentler heat.
Check the ingredients list: cocoa butter should appear, not vegetable fat.