For some coral, becoming buried in sand can be a major stressor and it's often fatal to the organism if it becomes completely covered.
But researchers recently observed a type of coral -- commonly called mushroom coral -- freeing itself from complete sedimentation through " rhythmic pulses and peristaltic waves". More simply put, it shimmy and shakes the sand off by inflating and deflating its tentacles.
Using time-lapsed videography sped up 300 times, you can see the coral freeing itself from what would have been a sandy grave for other coral species not known to exhibit this behavior:
Here's a second video of what is really a 10 to 20 hour process for the mushroom coral to inflate and deflate its tentacles to wiggle from the sand:
SpringerLink reports that the researchers at the University of Queensland took samples of the coral from the Great Barrier Reef and covered them completely with sand in a laboratory aquarium in order to capture the footage. Here is the more technical explanation of how the coral emerges from the sand:
Although many coral species exhibit the capacity of active sediment rejection, only few are capable of freeing themselves after becoming completely buried. Fungiid corals appear to be an exception, as they can remove sediments through substantial polyp inflation (up to five times their normal size) in addition to mucus entanglement and ciliary action [...] The combination of rhythmic pulses and peristaltic waves (during deflation) appears to represent an effective sediment shedding mechanism that allows these fungiids to excavate themselves within hours.