Periwinkles are sea snails, and look similar to land snails. They feed on the algae on the rocks. When the tide goes out they can be seen stuck to the rocks as in the second photo. When they are underwater, you'll often just see the eye stalks from under the shell, but in the photo below you can see a bit more of its stripy body.
