Some animals are protected from predation simply by camouflage as in the title image. The undescribed Tenellia species in the title image is a master at hiding. Many other nudibranchs and some shrimps have involved in the same way, imitating the food on which they live.
Ovulid cowries take this a step further. Natural selection has favoured populations that have not only a similar body form and colour and the sea fan branches they live on, but also have the same surface texture as the host coral.
In extreme cases the ovulid surface grows extensions that look exactly like the polyps of the host.
One group of Melibe nudibranchs have gone a step further in that their bodies are transparent only with a few pale nerve bundles/disgestive canals visible. They almost invisible on the soft corals they feed on.
Some shrimps are also masters of colour change so that they blend in with their background. Galastrocaris peronae is extremely variable in colour and in addition has a very flat profile so it blends in beautifully with what it is living on.
A photographically spectacular version of this is seen in Pontonides maldivensis below. Only the light of the strobe light brings out the brilliant orange colour of this shrimp. In ambient light, it is virtually impossible to see the shrimp, so closely does the shrimp colour match that of the host coral.
Another strategy, similar to some nudibranchs, is to look like the environment you live in. The shrimp Vercoia interrupta looks just like a dead shell. The only way you find it is when it moves, and even then you might think it is another hermit crab, and the nip it might give you.
An undescribed Hyppolite species has a ground colour the same as the coral it lives on. In addition a round area on its back is transparent while the tissue below the carapace is dark brown. When seen from above, this looks very similar to the corallites of the host coral.
Decorator crabs follow the same principle, but here, elements of their surroundings are deliberately taken and attached to their bodies. Finally, animals can physically hide inside another organism. What you cannot see doesn't make you hungry! There are shrimps and ladybugs (small shrimp relatives) that hide inside sea squirts or sponges.
One group of fish live inside sea cucumbers, and there is a pipefish that lives under the surface of and between the columns of organpipe coral.
There is even a nudibranch, Ercolania endophytophaga, that lives inside the Valonia alga that it feeds on.