I see some people are confused on what happened here in the gif so here is your explanation!
What just bit the Octopus on the head was a coffin ray
Just like other Rays and most of other sea predators they hide in the sand and wait for their prey
and before someone attacks me or worries and ask's me
Sting rays only hide in the sand for protection, they only hunt when on the move not when in the sand