Primarily it hides and uses camouflage (the mimic octopus is a master at this) to avoid enemies. However when attacked, it will squirt a cloud of ink at its attacker, blinding and confusing it. Under cover of the ink cloud it will jet away from danger.
Octopus also have a sharp beak that can inflict damage on an attacker and in one case (the blue ringed octopus of Australia), this beak can inject a poison into its attacker.
It hides in the sand or campfloges it'self to look like a octopus
they use there special ink to defend them selves
The octopus sprays a amount ink (when being attacked) .Then it swims away.
they squart out ink
it shoots ink at its rival to intimidate it.
By camouflage . Blending into the same color as its surrounding makes it difficult for prey to seek out the octopus
baned
A flower may have thorns such as a rose does enabling it to passively defend itself .
They can go through small cracks. They can jet up quickly.
a sea star defend itself by hiding under rocks year around
it stinks ink
how dose a boobook owl defend itself