The sugar molecules in simple syrup crystallize when enough of them cling together to render them insoluble in water. Sugar molecules are more likely to cluster and consolidate when combining sugar with water in a 2:1 ratio (commonly called "rich or heavy syrup"). When sugar molecules are heated, they transform into a hard structure as they cool. This causes the sugar to attach to different particles such as dust or burnt caramel. Crystallization will likely spread once some sugar crystallizes. How to fix it: simmer the syrup for at least 10 minutes instead of merely boiling it, allowing enough sugar to invert without affecting the taste. Be cautious not to let the mixture boil, as doing so will induce evaporation, altering the sugar to water ratio.