Oysters are bivalves , which means that its shell is made of two parts, or valves . The shell's valves are held together by an elastic ligament. This ligament is positioned where the valves come together, and usually keeps the valves open so the oyster can eat. The mantle is an organ that produces the oyster's shell, using minerals from the oyster's food. The material created by the mantle is called nacre .
Nacre lines the inside of the shell.
The formation of a natural pearl begins when a foreign substance slips into the oyster between the mantle and the shell, which irritates the mantle. It's kind of like the oyster getting a splinter. The oyster's natural reaction is to cover up that irritant to protect itself. The mantle covers the irritant with layers of the same nacre substance that is used to create the shell. This eventually forms a pearl.