The hard parts of an organism—such as the shell, bones, or teeth—are most often fossilized. These hard body parts are more likely than soft tissue to withstand destruction.
Second, the environment must be right to keep the object from decay. Rapid burial or submersion in water is necessary to encase the organism before bacteria, erosion, or predators get to it.
Water environments are where most fossilization occurs, since sediment generally provides protection from the erosion and weathering that can destroy objects on land.
Old fossils formed when soft parts of the dinosaur’s body decay, leaving the bones to be preserved in sediment. After millions of years, the rocks containing the dinosaur fossil are exposed on the surface.