The term fossil refers to any preserved remains or imprint of a living organism such as a bone, shell, footprint, or leaf impression.
There are several ways for fossils to form, but most fossils are found in sedimentary rock. Since most layers of sediment settle in water, most of the fossils found are of creatures that lived in the sea.
Those that had at least some hard parts are most likely to fossilize, as the hard parts can survive being tossed around. Layers of sediments settle all the time. Bodies of dead creatures and imprints of their passing are in these layers.
Even now the fossils of the future are forming!