Fresh and salt water pearls
Freshwater and seawater pearls can sometimes look quite similar, but they come from different sources.
Freshwater pearls are formed in several species of freshwater mussels, family Unionidae, that live in lakes, rivers, ponds, and other freshwater bodies. These freshwater pearl mussels are found not only in warmer climates, but also in cooler and more temperate areas like Scotland (where they are protected by law). Most of the freshwater cultured pearls sold today are from China.
Saltwater pearls grow inside the pearly oysters, family Pteriidae, that live in the oceans. Saltwater oysters are generally farmed in protected lagoons or volcanic atolls.
The pearls form within the shell of some mollusks as a defense mechanism against a potentially threatening irritant, such as a parasite within the shell or an attack from the outside that damages the mantle tissue. The clam creates lots of pearls to seal in irritation. Therefore, the beads are the result of a similar immune response in the human body to the capture of an antigen by a phagocyte (phagocytosis). 
The shell of the mollusk (protective membrane) deposits layers of calcium carbonate (CaCO3) in the form of the mineral aragonite or a mixture of aragonite and calcite (polymorphs with the same chemical formula, but different crystalline structures) joined by an organic compound. horn called conchiolina. The combination of aragonite and conchiolin is called nacre, which forms nacre. The common belief that a grain of sand acts as an irritant is rarely the case. Typical stimuli include organic material, parasites, or even damage that moves the mantle tissue to another part of the mollusk’s body. These small particles or organisms enter when the valves of the shell are open to feed or breathe. In cultured pearls, the irritant is usually an embedded piece of mantle epithelium, with or without a spherical pearl (cultured pearls with or without pearls).  
Natural pearls are almost 100% calcium carbonate and conchiolin. Natural pearls are believed to form under a number of accidental conditions when a microscopic intruder or parasite enters a bivalve mollusk and lodges within the shell. The mollusk, irritated by the intruder, forms a large number of cell beads from the outer layer tissue and secretes calcium carbonate and conchiolin to cover the irritant. This secretion process is repeated many times, thus producing a pearl. Natural pearls come in many forms, with perfectly round ones being relatively rare.
Typically, the accumulation of a natural pearl consists of a central brown zone formed by columnar calcium carbonate (usually calcite, sometimes columnar aragonite) and a yellowish to white outer zone consisting of nacre (tabular aragonite). In a cross section of beads like the diagram, you can see these two different materials. The presence of columnar calcium carbonate rich in organic material indicates the juvenile layer tissue that was formed during the initial phase of pearl development. Displaced living cells with a well-defined task can continue to perform their function in their new location, often causing a cyst. Such a change can occur due to injury. The fragile edge of the shell is exposed and prone to damage and injury. Crabs, other predators and parasites such as worm larvae can produce traumatic attacks and cause injuries in which some cells of the outer layer tissue become disconnected from their layer. Embedded in the connective tissue of the mantle, these cells can survive and form a small pocket in which they continue to secrete calcium carbonate, their natural product. The pocket is called a pearl bag and grows over time by cell division. The cells of the juvenile mantle tissue, depending on their growth stage, secrete columnar calcium carbonate from the inner surface of the pearl sac. Over time, cells in the outer mantle of the pearl sac proceed to form tabular aragonite. When the transition to mother-of-pearl secretion occurs, the brown stone becomes covered with a pearly layer. During this process, the pearl sack appears to travel in the shell; however, the sac remains in its original relative position in the mantle tissue as the carapace grows. After a couple of years, a pearl is formed and a lucky pearl fisherman can find the shell.