Almost everyone has had the experience of eating or drinking something so powerfully sour it was almost painful. Sometimes this is accidental, when a cook adds too much vinegar to a recipe, or doesn't add enough sugar to the lemonade. Other times it is simply unavoidable, as in the case of a medication. Either way, both home cooks and manufacturers are highly motivated to conceal undesirable flavors. Manufacturers can call any number of chemical additives to their aid, but home cooks have to depend on the contents of their pantry.
Sweetness is the contrast to sourness, and is the most fundamental way to balance a strongly sour flavor. This is why extremely tart ingredients such as lemons, limes and quinces are commonly accompanied in recipes by sugar and other sweeteners. Sweetness can moderate acidity to the point that it becomes refreshing, rather than unpleasant. Lemonade is a familiar example. Without enough sugar, it is mouth-puckering and astringent, but with too much it is cloying. Sweeteners are not appropriate in all dishes, but when appropriate they can be used alone or in conjunction with other flavors.
Salt is another of the very fundamental flavors, and is powerful enough to hold sourness in check. Salt and sour signals from the taste buds are both interpreted by the same part of the human brain, making it difficult to perceive either one strongly when the two are in balance. This is why many sour condiments include salt, and sour candies occasionally have a salty coating. A small portion of additional salt can reduce the perception of sourness, especially if it is supplemented with some sweetness.
The heat of chili peppers is a very potent flavoring, one that can provide the brain's taste perception centers with all the stimulation it can readily accommodate. The active ingredient in chili peppers, a compound called capsaicin, activates the same sensors on a human tongue that warn of excessive physical heat. The brain reacts to protect itself by reducing its sensitivity to incoming signals from the mouth, and by releasing pain-relieving endorphins. The net effect, for the diner, is to mask the impact of acidity.
Strongly savory flavors, such as those generated by roasted or grilled meats, can also combat the effect of sourness. One example is the Philippine adobo marinade, which combines savory soy sauce and garlic with vinegar to impart their flavors to chicken and pork. Other foods that contribute significant savory flavors include those in the onion family, celery, mushrooms and seaweed. These are used in conjunction with sour flavors in many cuisines around the world, especially in Asia where the balance of hot, sour, salty and sweet is consciously pursued.