Here's how it happens:
1. Organism dies and is buried: A plant or animal dies and is quickly covered by sediment like sand, mud, or volcanic ash.
2. Decomposition and Dissolution: The organism's soft tissues decompose, and over time, even hard parts like bones or shells can dissolve in the surrounding sediment.
3. Hollow Space Remains: The dissolved organism leaves behind an empty space in the rock, shaped like the original organism. This space is the mold.
Note: A cast is formed when minerals fill this hollow mold, creating a replica of the original organism.