Candy is the word Americans use for boiled sweets. However, candy, as a word is much older. It was first used in the Middle Ages in Middle Eastern countries meaning 'sugar'. Boiled sweets are, indeed, simply boiled sugar, water and some color and flavor.
In America 'candy' is now used more widely than just boiled sweets, to include 'candy bars' and so on.