How did mutualisms between individuals of different species develop? These associations take many forms, but some symbioses evolve so that dependence results; the best known examples being lichens, where fungi and algae live together to mutual advantage.
A symbiosis is found between a species of hermit crab, Pagurus prideaux and a sea anemone Adamsia palliata (pictured below, the Adamsia having pink spots), although it is not essential for the survival of each . There are many species of hermit crabs, but all are characterised by having a soft abdomen that is held within a snail shell left behind after the gastropod has died. This is a remarkable association between a living animal and the remains of another and, as an individual crab grows, it leaves one shell and searches for another that is more suitable for its increasing size. The aperture of shells occupied by P. prideaux usually has an individual of A. palliata attached to it, located the entrance in a position where it doesn't have a marked effect on the centre of gravity of the shell.
The advantages of symbiosis between sea anemones and hermit crabs have been reviewed by Gusmão and Daly , with the sea anemones benefitting from an increase both in dispersal and in the chance of encountering food; and the hermit crabs being protected against predators by the stinging cells of the sea anemone. So how does the sedentary sea anemone move to the snail shell occupied by the crab? The locating behaviour was described by Philip Henry Gosse, the great nineteenth-century Natural Historian. Here is his observation :
Carefully taking up the shell with the aquarium-tongs, and bringing it close to the surface, but not out of water, I gently dislodged the Adamsia with my fingers, and allowed it to fall prone upon the bottom. I then released the shell with its tenant, and drove the latter towards the spot where the zoophyte lay.
No sooner did the Crab touch the Adamsia than he [sic] took hold of it with his claws, first with one, then with both, and I saw in an instant what he was going to do. In the most orderly and expert manner he proceeded to apply the Adamsia to the shell. He found it lying base upward, and therefore the first thing was to turn it quite round. With the alternate grasps of the two pincer-claws, nipping up the flesh of the Adamsia rudely enough, as it seemed, he got hold of it so that he could press the base against the proper part of the shell, the inner lip. Then he remained quite still, holding it firmly pressed, for about ten minutes; at the end of which time he cautiously drew away first one claw, and then the other; and, beginning to walk away, I had the pleasure to see that the Adamsia was once more fairly adhering..
Long-term attachment is aided by the secretion of chitin, this being a feature of several sea anemones and not just Adamsia. However, the chitin produced by Adamsia forms an extension of the snail shell and, in the following description of the process , the reference to chitine and a horny membrane come from the observations of Henry Gosse:
..sea anemones of the genus Adamsia living on gastropod shells inhabited by hermit crabs may extend the shell's lip by secreting what is variously called a cuticle, "chitine", a horny membrane, or solidified mucus.
This is what Gosse wrote in Actinologia Britannica 
Very frequently, there is found intervening between the Adamsia and the shell to which it is affixed, a film of membrane, of a horny texture, somewhat brittle, of a translucent dark greenish-brown colour. After death this film is found adherent to the surface of the shell, from which, however, it easily peels when dry.. ..From several specimens.. .. I have been able to learn the nature and object of this membrane.. ..it appears to me manifest that the membrane is a provision for the support of the growing Adamsia.. .. it is composed mainly of chitine, having no calcareous element.. .. The membrane is not invariably present.
Gosse goes on to say :
Pagurus Prideauxii seems to be as dependent on the Adamsia, as the latter is on it.. ..Why one species of Soldier-crab must needs seek the companionship of this Anemone, while other Soldier-crabs are able to live alone; and why this species of Anemone must needs associate with the Soldier-crab, while others kinds of Anemone are solitary, I can by no means answer.
As described above, we now have information of the mutualism and how it benefits both partners. For Henry Gosse (whose beautiful illustration is shown below), the association of the hermit crab and gastropod shells and the mutualism between Pagurus prideaux and Adamsia palliata were yet more wonderful examples of the complexity of God's Creation.
For those of us that believe in evolution, it is fascinating to speculate on the various steps that must have taken place to allow the association between the crab and the shell, and then the crab and the sea anemone. The secretion of chitin by the sea anemone was a pre-adaptation and may have originally been a means of ensuring that broken, or friable, substrata could be colonised. It now results in the secure attachment to snail shells and gives the hermit crab the advantage of changing shells less frequently. How did the crab learn to transplant a sea anemone on to a new shell; and why this one species?
Evolution fills one with a sense of wonder, doesn't it?
 R. M. L. Ates (1995) Pagurus prideaux and Adamsia palliata are not obligate symbionts. Crustaceana 68: 522-524.
 Luciano C. Gusmão and Marymegan Daly (2010) Evolution of sea anemones (Cnidaria: Actinaria: Hormathiidae) symbiotic with hermit crabs. Molecular Phylogenetics and Evolution 56: 868-877.
 Philip Henry Gosse (1865) A year at the shore. London, Alexander Strahan.
 Daphne Fautin Dunn and Martin H. Liberman (1983) Chitin in sea anemone shells. Science 221: 157-159.
 Philip Henry Gosse (1860) Actinologia Britannica: a history of the British sea-anemones and madrepores. London, Van Voorst.