The relationship between a Sea Anemone and a Clown fish is mutual because they both benefit from each other in different ways. Symbiotic relationships have gone on since the beginning of time and this example that I've given is only one of many out there. Due to the Sea Anemones ring of stinging tentacles not many predators of the sea will come near it, however they do have one predator that because of the Clown fish residing in most Sea Anemones they stay safe and protected from the Butterfly fish. The Butterfly fish isn't a terrible threat to the Sea Anemone, however it is still a threat due to it feasting on the algae that resides on the tentacles which takes food from the Anemone. Now the reason being why the Clown fish can withstand the sting of a Sea Anemones tentacles is because Clown fish, unlike other fishes, have a layer of mucus on their skin that protects it from the stinging of the Anemones tentacles. Something that benefits the Anemone is that Clown fish have the reputation to get territorial of their homes which means that the Anemone will have less predators roaming around them. Another way how the Sea Anemone is helped by the Clown fish is the waste that the Clown fish leaves in the Anemone is known to contain nutrients that helps the Anemone survive.
Sources: https://suite.io/megan-jungwi/1sm129d & http://bcbpnews.com/Species/butterfly-fish-and-sea-anemones