Theory:

The process of formation of fossils in the rocks is known as fossilization.
The common methods of fossilization includes:
  • Petrification
  • Moulds (molds) and cast
  • Carbonization
  • Preservation
  • Compression
  • Infiltration
Petrification:
Minerals such as silica, calcite or pyrite gradually enter and replace the original biological tissue, resulting in a rock-like fossil. Hard and soft portions can be preserved using this approach of fossilization. The majority of bone and wood fossils have been petrified.
 
ammonite-2810722_1920.jpg
Petrified fossil
Mould and cast
The replicas of plants and animals are preserved in sedimentary rocks.
 
Mould:
  
When these plants and animals get buried in the sediment, it dissolves by the underground water leaving a cavity like depression called the mould. Moulds are generally unfilled or may be partially filled with sediment.
 
800px-Sthenarocalymene_celebra_-_Arthropoda,_Trilobita,_Polymerida,_Calymenidae_-_Silurian_-_Ohio,_USA.jpg
Fossil of Trilobita as an example of mold
 
These moulds show the original shape of the organism but does not reveal the internal structure.
 
Cast:
  
When the minerals or sediments fill the hollow depression they form casts. A cast results when sediment is deposited into cavities left by the decay of plant parts.
 
567px-thumbnail.jpg
Cast
Organic substance is often absent in casts and moulds, but a resistant structure can be kept by compressing the surface of the cast or the inside of the mould.
Along with the cast filling, you'll find casts and moulds.
Preservation:
In this type of fossil, the original remains of the fossil are preserved in ice or amber (tree sap). These substances protect the organisms from decay and thereby preserve the entire plant or animal.
 
450px-Culex_malariager_in_Dominican_amber.jpg
Culex mosquito preserved in amber
Compression:
These are two-dimensional fossils that contain organic material. In general, when an organism dies, the hard parts of its bodies settle at the bottom of the sea beds and get covered by the minerals (sediments). This process of sedimentation occurs continuously and leads to the formation of fossils. Compressions retain organic matter, usually more or less coalified.
 
Peat, lignite, and coal are essentially compressions of thick accumulations of plant debris
 
800px-FossilFernLeavesPennsylvanianOhio1234 (1).jpg
Compressions
Infiltration or replacement:
In these types of fossils, the precipitation of minerals leads to the infiltration of the cell wall. This process is brought about by minerals such as silica, calcium carbonate and magnesium carbonate. All the complex parts of the organisms are dissolved and replaced by these minerals.
 
HEX codes.png
Reference:
https://commons.wikimedia.org/wiki/File:Sthenarocalymene_celebra_-_Arthropoda,_Trilobita,_Polymerida,_Calymenidae_-_Silurian_-_Ohio,_USA.jpg
https://commons.wikimedia.org/wiki/File:Eospermatopteris_textilis_fossil_tree_trunk_(Ithaca_Formation,_Upper_Devonian;_Riverside_Quarry,_Gilboa,_Schoharie_County,_New_York_State,_USA)_(15523316876).jpg
https://commons.wikimedia.org/wiki/File:Culex_malariager_in_Dominican_amber.jpg
https://commons.wikimedia.org/wiki/File:FossilFernLeavesPennsylvanianOhio1234.jpg
https://commons.wikimedia.org/wiki/File:Ginkgo_biloba_001.JPG