Behind the beautiful shapes and colors of seashells is the story of how a group of animals called molluscs evolved in order to survive. The wide variety of molluscs includes clams, oysters, snails, mussels, squid, and octopus. The word mollusc comes from Latin meaning "soft," a good description of the group's fleshy bodies. Of course, in an ocean filled with predators, a soft body is easily eaten. The early molluscs that happened to develop hard shells not only managed to survive but also succeeded in launching an ever-escalating 500 million year old battle between themselves and their predators.
Molluscs have survived throughout the millennia by having an immensely adaptable body plan. One example of this is demonstrated by today's Nautilus. The ancestors of Nautilus evolved buoyant shells, a trait that allowed them to launch off the seafloor and become swimming predators known as cephalopods.
As each generation struggled against increasingly clever predators like vertebrates, the cephalopods accumulated more and more sophisticated innovations through evolution. One adaptation lay in speed. In creatures such as squid, the shell became smaller, moved inside the body and all but vanished. Another adaptation lay in brainpower. Octopuses and cuttlefish think, learn and react to their environments in ways surpassed only by vertebrates. If you have a soft body without a shell in the middle of the ocean, being clever is certainly one worthwhile strategy for survival.