For a fossil to form, several conditions have to be met. First of all, the animal had to live in the given area! Animals live in many environments on Earth, but not everywhere. The water above many lake bottoms and many areas of the deep ocean bottom are stagnant. The bottom water is never exchanged with surface waters, so the water contains no dissolved oxygen. Animals cannot live without oxygen, so no animals live there. In these situations, the only possibility of fossilization is if a fish or other swimming animal dies in oxygen-rich waters above, sinks down into the stagnant muddy bottom, and is buried by sediments.
Most environments on the land surface are populated with animals. Fossilization on land is very uncommon, however, because most areas of the land are being eroded. Unless there is deposition, fossils cannot be preserved. Deposition on land is common only in river valleys. Fossils are fairly common in sediments deposited on river floodplains. Some ocean environments that support animal life are exposed to very strong currents and waves. After a shelled animal dies, the strong water motions cause the hard body parts to be broken and worn. Often the shells end up just as rounded grains of sand or gravel, which no longer look like fossils.
For animals without skeletons, like worms or jellyfish, fossilization is a very rare event. When paleontologists find a well-preserved fossil of a soft-bodied animal, it's an occasion for celebration. For a soft-bodied animal to be fossilized, its body must be protected from decomposition. The body is usually exposed to air and water with a lot of oxygen, so it decomposes rapidly.The animal is likely to be fossilized only if it is buried soon after it dies (or when it is buried alive!). Even then, it is likely to decompose, because water that seeps through the sediment around it usually is rich in oxygen. Sometimes, however, the body is buried rapidly by fine mud. Water seeps through mud much more slowly than through sand, so the body does not decompose as fast. Mud often contains a lot of other organic matter as well, and that uses up oxygen faster. Some animal bodies then escape decomposition. Under just the right conditions, a delicate impression of the animal might be preserved.
Paleontologists are sure that the fossil record is biased. That means that some kinds of organisms are much scarcer as fossils than they were when they were alive. Other kinds of organisms are much better represented by fossils. Animals with hard shells and skeletons are represented well in the fossil record. On the other hand, soft-bodied animals are probably represented very poorly. It's likely that most soft-bodied species that ever existed are gone forever without a trace. Land animals are probably very poorly represented as well. For example, most animals that are now alive, or ever have lived, are insects, but the fossil record of insects is poor.