Caramelizing usually involves cooking the food low and slow, allowing the natural sugars to break down into simple sugars. The result is a browned, sweet-tasting dish. This happens with shallots, and it also happens with onions.