Cream of tartar, more technically known as potassium hydrogen tartrate, is a fine white powder with many culinary applications. It is a byproduct of the winemaking process as the powder forms inside wine barrels during fermentation. It comes from tartaric acid, a naturally occurring substance in grapes and some other tart fruits that in the principle acid in winemaking. It helps to help control the pH of fermenting grape juice (wine) and that also acts as a preservative for the wine.
Tartaric acid has been used in winemaking for centuries (when separated from grapes and purified, it is a white powder that is similar to cream of tartar) and cream of tartar has been around just as long, put to use by creative cooks in a variety of culinary applications. It is an acid and it is often used as a major component in baking powder, combined with baking soda to react when the mixture is moistened to ensure that baked goods will rise well. Although it is an acid, the cream of tartar and the baking soda will not react when dry, so the entire reaction is saved for the mixing bowl and the oven. More visibly, since most of us do not mix our own baking powder, cream of tartar is used as a stabilizing agent and is added to beaten egg whites to increase their stability and volume. It is also sometimes added to candies or frostings to give them a creamier texture because it can help to prevent the crystallization of cooked sugar.
In some situations, vinegar can be substituted for cream of tartar, although there is no exact substitute for the powder. This can be done when beating egg whites or making meringue, and it can also be done in a baking recipe that calls for separate measures of cream of tartar and baking soda. For candy making, it is best to refer to the recipe and see if substitutions will work because the recipes are often very sensitive to substitutions.