The hard, rigid outer covering of certain animals is called a shell. While many animals, particularly those that live in the sea, produce exoskeletons, usually only those of mollusks are considered to be shells.
The shell is usually made of nacre, followed by an intermediate layer of calcium carbonate as either calcite or aragonite in the form of platy crystals.
When a mollusk is irritated by a foreign object that the animal cannot eject, a process known as encystation entombs the offending entity in successive, concentric layers of nacre. This process eventually forms what we call pearls and continues for as long as the mollusk lives.
Shells are very durable and outlast the otherwise soft-bodied animals that produce them by a very long time.
Information source: Wikipedia