Why do fossils form?

Quick burial in mud or ash can protect remains while minerals slowly replace bone.