Pearls are made when a foreign object like some dirt or a small piece of stray food gets inside the shell of an oyster (or other mollusk) by mistake. To protect itself, the creature covers the intruding object with the same stuff its shell is made of, a mineral known as nacre. The oyster or other mollusk continues covering the object with multiple layers of nacre, eventually forming a pearl.