Hardened caramel dissolves in water, so the cleanup is mostly a matter of heat and patience. The one real hazard is adding water to hot sugar, which can spatter. Let the pan cool first, add water carefully, and simmer until the caramel loosens.
Why caramel is hard to remove
Sugar that has been heated past the melting point sets into a hard, glassy layer when it cools. It bonds tightly to the surface, and scraping alone often just breaks it into shards. Water works because sugar dissolves in it.
Let the pan cool until it is warm, then add water carefully
Never pour water into a pan with molten or very hot caramel. It can bubble up and splatter, and the steam can burn. Wait until the pan is warm to the touch, then add about a quarter cup of water. Pour it slowly, and keep your face and hands back from the pan.
Simmer until the caramel loosens
Set the pan over low heat and let the water warm and simmer. The caramel will soften and dissolve over several minutes. Stir or scrape with a wooden spoon as it loosens. If the sugar has not dissolved after a few minutes, add a little more water and keep simmering.
Scrape and wipe away the sticky residue
Once the caramel has dissolved or lifted, pour out the sugar water and scrape the pan. Wipe away the sticky film with a paper towel. A little warm water and a soft brush can finish the job.
Dry and re-oil the pan
Sugar residue can leave the surface tacky and draw moisture, so dry the pan thoroughly over low heat. Then rub a thin layer of oil over the cooking surface. Check the seasoning for dull or thin spots, since heavy sugar cooking can wear it down.
A note on safety
Hot sugar causes serious burns. Use a long-handled spoon, keep children and pets away, and move slowly when you add water. If the caramel is burnt black, it may take several rounds of simmering to clear.
If the seasoning looks damaged after a sticky mess, you can season a cast iron pan again to restore it. For routine cleanup after a normal meal, see how to clean a cast iron pan.