When animals, plants and other organisms die, they typically decay completely. But sometimes, when the conditions are just right, they're preserved as fossils.
Several different physical and chemical processes create fossils, according to the New York State Geological Survey.
Freezing, drying and encasement, such as in tar or resin, can create whole-body fossils that preserve bodily tissues. These fossils represent the organisms as they were when living, but these types of fossils are very rare.
Most organisms become fossils when they're changed through various other means.
The heat and pressure from being buried in sediment can sometimes cause the tissues of organisms — including plant leaves and the soft body parts of fish, reptiles and marine invertebrates — to release hydrogen and oxygen, leaving behind a residue of carbon.
This process — which is called carbonization, or distillation — yields a detailed carbon impression of the dead organism in sedimentary rock.
The most common method of fossilization is called permineralization, or petrification. After an organism's soft tissues decay in sediment, the hard parts — particularly the bones — are left behind.
Water seeps into the remains, and minerals dissolved in the water seep into the spaces within the remains, where they form crystals. These crystallized minerals cause the remains to harden along with the encasing sedimentary rock.
In another fossilization process, called replacement, the minerals in groundwater replace the minerals that make up the bodily remains after the water completely dissolves the original hard parts of the organism.
Fossils also form from molds and casts. If an organism completely dissolves in sedimentary rock, it can leave an impression of its exterior in the rock, called an external mold. If that mold gets filled with other minerals, it becomes a cast.
An internal mold forms when sediments or minerals fill the internal cavity, such as a shell or skull, of an organism, and the remains dissolve.
In recent years, researchers have discovered that some fossils aren't just made of minerals. Fossil analyses have shown, for instance, that some retain organic material dated to the Cretaceous, a period that lasted from 65.5 million to 145.5 million years ago, and the Jurassic period, which lasted from 145.5 million to 199.6 million years ago
Tests suggest that these organic materials belong to dinosaurs because they match certain proteins from birds, which evolved from dinosaurs.
"It used to be that no one thought it was possible for any endogenous material — material that comes from the animal — could be left behind after the fossilization process," said Ken Lacovara, the dean of the School of Earth and Environment at Rowan University in New Jersey. "[But] that's not really the case."
It's unclear how the organic material is preserved, but iron might help the proteins become cross-linked and unrecognizable, or unavailable to the bacteria that would otherwise consume them, Lacovara said. (Formaldehyde works in a similar way, cross-linking the amino acids that make up proteins, making them more resistant to decay, Mary Schweitzer, a molecular paleontologist at North Carolina State University, told Live Science.)
Another idea is "microbial masonry," Lacovara said. "It's possible that the bacteria that initially chomped through the tissue are secreting minerals as a waste product that then hermetically [airtight] seal a little bit of what remains behind," almost like a stone mason sealing off a structure, he told Live Science.
Moreover, sandstone — rock made of sand-size grains of minerals, sediments or inorganic material — seems to be the best type of environment for preserving organic material in fossils.
"Sandstone is like a bunch of volleyballs sitting on top of each other with big interstitial [spaced] areas between them," Lacovara said. "So it seems like rapid decay might promote the preservation process. Maybe we need the bacteria to get through fast and to chomp through the sediment so that they can sequester some of [the surviving organic material] in the process."
Additional reporting by Staff Writer Laura Geggel.