Petrification occurs when:

shell, bone, or wood is replaced with dissolved minerals
dead organisms are exposed to oxygen and calcium carbonate
a cast fossil is later filled with minerals
an organism is completely preserved in ice or oil

shell, bone, or wood is replaced with dissolved minerals.