|this image via Wikipedia|
This is actually a special type of preservation called permineralization, where an inorganic mineral "replaces" or forms a cast of a particular structure. Mostly hard parts, but soft parts are also replaced, as we'll see.
Pyritized Devonian brachiopod! Paraspifier bownockeri. Image by James St. John
Here is the Devonian Furcaster paleozoicus..a Paleozoic brittle star from the famous Hunsruck slate in Germany
But probably one of the most exceptional examples of pyritization is when it captures soft tissues, such as on the trilobite, Triarthus