In permineralization, a porous substance, such as a bone, is buried in sediment. Water trickling through the sediment comes in contact with the bone and seeps through the pores in the bone. Minerals carried by the water are deposited in the pores. Over time, the bone dissolves, but the minerals deposited by the water remain.
The leftover minerals make up the shape of the bone that no longer exists.