A crab in the aquarium tries to steal food from the anemone. Trouble is, the anemone fights back.
The anemone tolerates hermit crabs crawling all over her, stealing food, scratching at her sides, just resting. But crabs are not allowed. Her stinging cells (nematocysts) react to the touch of a crab and attempt to trap or poison the invader.
Each nematocyst contains a small venom vesicle filled with actinotoxins, an inner filament, and an external sensory hair. A touch to the hair mechanically triggers a cell explosion, which launches a harpoon-like structure that attaches to the organism that triggered it, and injects a dose of venom in the flesh of the aggressor or prey. This gives the anemone its characteristic sticky feeling. (Wikipedia)
When the crab is large, it is seen as an agressor. A small crab is prey; if caught it is quickly swallowed. The next day, the anemone spits out a clean crab carapace.