Redditor Proteon posted this image of a fossilized snail turned to opal recently. Opal forms in cavities inside rocks. If a cavity is created due to a bone, shell or pine cone being buried in the sand or clay that later became the rock, and conditions are right for opal formation, then opal forms a fossilized likeness of the object. A silica-rich environment is required for opal formation. -Via Science Dump