Candy specifically refers to the cooking of sugar, which transforms it into many different forms. Adding flavor is part of it, too, of course, but the core of candy-making revolves around using the right cooking temperatures to achieve different textures based on how much water it leaves behind.