Shell is calcium carbonate, secreted by mantle. Mother of pearl is the inner layer of shell. A particle of sand gets stuck between shell and mantle, concentric layers of calcium carbonate secreted from mantle to form pearl. Real pearls have rough surface. Along edge of scallop shell, they can detect image.
Oysters attach permanently, clams burrow, as do shipworms.
Scallops swim by clapping their shells together. Clams, oysters are suspension feeders. Water comes in by incurrent siphon, moves over gills. Gills are covered with mucus that traps bits of food. Food is moved by cilia to mouth.