This is a brachiopod, commonly known as a lampshell. Although they look like clams, they are actually very different animals. Clams and mussels posses a foot that allows them to bury themselves in the sand. They also posses a siphon that allows them to draw water into their shell, even as they remain buried. Perhaps the most important difference between brachiopods and clams is the filtering apparatus. Clams filter the water using their gills. Brachiopods have a specialized feeding filter called a lophophore (yes, just like the bryozoa!). You can see it outline in the picture as the darkened horseshoe shaped lines within the shell. Brachiopods are attached to the bottom by means of a stalk (although there are stalkless ones as well). They cannot bury themselves, as they lack siphons. Instead they bring water into their shell by leaving it slightly open and creating a current with the cilia on their filtering apparatus.
These guys used to be the ‘bees knees’ as it were. There was once over 4500 different genera existing in all parts of the ocean. Now there are only 350 different species of brachiopods, and they are only found between 100 to 200 meters (330-600 feet) down.
So what happened? Why do we now have clams and such instead of brachiopods? Well there are several hypotheses, but I will share the one that makes the most sense to me. Brachiopods were well established when the clams came along, and were not giving up the prime spots to any newbie filterer. However, the decline of brachiopods coincided with the rise of shell crushing sharks. The clams, which could bury themselves, had a refuge from predation that the brachiopods could not utilize. So, brachiopods got crunched, and the clams and such took over the filtering the ocean gig.
Brachiopods are so abundant as fossils that they are often used to date rocks. (Like, finding a certain species will tell you that the rock is between x and z years old) They can also be bought at any curio or museum shop, as an example of a real fossil along with the ever-present trilobite.