Candy corn is made with fondant, a special confectionery ingredient consisting of about 20% sugar and 80% corn syrup. Fondant is solid at room temperature but becomes a nice smooth fluid as it is heated because sugars are more soluble at higher temperatures. This liquidy syrup is deposited in molds as it was around the turn of the century, but the process is slightly more efficient.
Rather than using solid molds to shape candy corn into its distinctive form, the syrupy slurry is poured into indentations in a tray of corn starch.
Candy Science Tuesday: Candy Corn and Starch Molding | Candy Dish Blog