Pearls result simply from mother of pearl solidifying into a globular shape. Either they stick to the oyster's shell, or they become embedded in the creature's folds.