The fact that the animal which lives at the open edge of the shell places new shell material always in that edge, and faster on one side than the other, makes the shell to grow in a spiral. The rates at which shell material is secreted at different points of the open edge are presumably determined by the anatomy of the animal. And, surprisingly, even fairly small changes in such rates can have quite tremendous effects on the overall shape of the shell, which is in the origin of the existence of a great diversity of shells.
Next: 1. How seashells grow