A cave pearl is a speleothem (cave formation) which is typically small, spherical, white, and consists of calcite like stalactites and stalagmites. Cave pearls often form in small pools with a continual flow of water, and there are typically betwen half a dozen and several dozen pearls of similar size in a sort of nest. Internally each pearl has concentric layers, similar to the layers a stalagmite, around a nucleus, in most cases a grain of sand.
Cave pearls form like stalagmites, but the calcite is precipitated on the nucleus, instead of on the floor. The pearl is melded into the floor if there is no continual flow of water which continully moves the pearl. Sometimes the amount of water is reduced and the pearls start tp stick to one another or to the bottom of the pool. It must be moving too vigorously to form a stalagmite, and the current provides a rotation to the nucleus, so it grows evenly on all sides. Sometimes multiple oearls move around each other in a small pool, at other times each pearl has its own small pit. The movement is mechanical stress, to the pearl which might get polished, or to the pit, which might deepen and grow with the pearl. There are also theories that microbial action might be involved in their formation. In other words, the situation must be very special to produce cave pearls, and thus they are quite rare.
Cave pearls are composed primarily of calcite or aragonite (calcium carbonate, CaCO3). But other minerals found in small quantities include quartz (silicon dioxide, SiO2), apatite, a group of phosphate minerals, iron, aluminum, and magnesium. Most pearls have a diameter below 1 cm, but they may grow as big as 20 cm in very rare cases.
The most spectacular caves pearls are "the size of baseballs" in Son Doong Cave in Vietnam, or 200 million pearls filling a single passage in Gruta de las Canicas (Cave of the Marbles) in Tabasco, Mexico. Pretty famous are the pearls of Lechuguilla cave. In Carlsbad Caverns, New Mexico, the Rookery has so many cave pearls that they were at one time handed out to visitors as souvenirs.