Sugar has many uses in cooking beyond just providing sweetness. It acts as a preservative in jams and jellies, helps baked goods rise by feeding yeast, enhances flavors, adds color through caramelization, prevents spoilage of canned foods, and controls the texture of frozen desserts, candies, and more. There are various types of sugar used for different purposes, and sugar goes through several stages of crystallization when cooked to different temperatures that impact its properties.