Fossils are of many types. For example teeth, bones and shells, and is also for molds and casts. Remains of prehistoric elephants call mammoths that were frozen.
When a shell or other structure is buried in sediment and then dissolved by underground water, a mold is created.