A compound in licorice root called glycyrrhizin.
Licorice root comes from Glycyrrhiza glabra, a plant in the pea family native to southern Europe and Asia. Its roots contain glycyrrhizin, a compound around 50 times sweeter than sugar, with a distinctive lingering, slightly medicinal taste. Licorice extract from the root is what gives true black licorice its flavor and dark color.
Many licorice candies also add anise oil, which has a similar flavor, and some American "licorice" relies mainly on anise. Red licorice usually contains no licorice root at all; it's fruit-flavored candy in licorice shape.
Licorice is a passion in the Netherlands and the Nordic countries, where salty licorice, flavored with ammonium chloride, is hugely popular.
One caution: glycyrrhizin can lower potassium levels and raise blood pressure if eaten in large amounts. The FDA has warned that adults over 40 who eat 2 ounces of black licorice a day for at least two weeks could develop heart rhythm problems.