So, what makes caramel go from a beautiful, golden brown to a sad, gloopy mess? It all comes down to chemistry, baby! When you heat up sugar, it breaks down into different compounds, which can either create a smooth, creamy caramel or a grainy, crystalline one - it's like a Choose Your Own Adventure book, but with sugar.
The key is to cook the caramel slowly and carefully, monitoring the temperature to ensure it doesn't get too hot or too cold. And don't even get me started on stirring - it's like trying to dance the tango, you've got to feel the rhythm and move with the music (or in this case, the sugar). Too much stirring and you'll end up with a seized caramel, which is just a fancy way of saying "caramel that's been ruined by your meddling"!
But fear not, dear reader, for there are ways to rescue your caramel, even if it's gone a bit awry. You can try adding a thickening agent, like cornstarch or cream, to give it a bit more oomph. Or, if all else fails, you can always start again from scratch - after all, practice makes perfect, and caramel is like the ultimate practice dessert.
Thicken Caramel at Garrett Kirk blog