The primary step in candy making is to boil water (and, sometimes, other ingredients, such as butter, corn syrup, or milk, depending on the candy being made) and sugar together to make a syrup. As the mixture boils, the water evaporates; the less water the syrup contains, the harder it will set when cooled. The stages sugar syrup goes through as it's cooked are named for the texture it takes on once it's completely cool. Some cookbooks list as many as a dozen different stages, but I've found that knowing just four major stages is sufficient for making most candies.
The first of these is the soft-ball stage, which occurs between 235°F and 240°F; after being cooked to this temperature, cooled sugar syrup forms a soft, malleable mass between your fingertips and is perfect for fudges and peppermint patties.
Between 240°F and 265°F, sugar reaches the hard-ball stage, at which the cooled syrup is still malleable but doesn't squash as easily, so it is ideal for marshmallows and nougats.
After being cooked to between 270°F and 290°F, the soft-crack stage, cooled syrup will break gently and make for toothsome gumdrops and taffies.
Finally, hard candies like lollipops and crunchy toffees require sugar syrup that has reached the hard-crack stage (300°F to 310°F), at which the cooled syrup snaps audibly. Sugar syrup cooked past the hard-crack stage becomes caramel.
For making candy, an accurate candy thermometer is essential, but many cooks also rely on the "cold water test", in which the sugar syrup is removed from the heat and a spoonful of it is dropped into ice water. If the cooled sugar syrup hasn't reached its desired hardness, it's put back on the heat. If you find you've overcooked your syrup by a few degrees, all is not lost. Adding 1/4 to 1/2 cup water or milk (or whatever additional liquid is called for in the recipe) will reduce its temperature.