|Photo by pfly|
That colorful skin reportedly contains a toxin that deters most predators. Still, a sunflower star might be interested in a munch. If one of those multi-armed sea stars attacks, a cucumber's main defense is to eviscerate itself. The animal contracts, which squeezes the water inside its body, exerting pressure that forces out its internal organs, usually via the anus. Apparently the idea is that the predator will be interested in the offal, and let the cucumber make its getaway (it has tiny tube feet, so it's kinda a slow getaway).
The loss of internal workings doesn't seem to hinder the creature, and it regrows them within a few months. Which is good, since it seems to be its standard response to everything else it finds unpleasant, such as internal parasites, dirty water, or changes in water temperature.
Have you ever seen a sea cucumber?