User:The real Unspeakable/sandbox

Fossil form when the organism dies then the bone(s) are covered with rock specifically sedimentary rock. After thousands of years the bone dissolves. When the bone is dissolved sand or other particles like dust or just dirt finds their way into the hole where the bone used to be. Then the sand or dirt hardens over millions of years. Then due to erosion, the fossil is carried to the surface of the crust.