What is fossils ?
Remains of living organisms that have changed to rock are called fossils.
When animals and plants die, their bodies may fall into sediments. usually , they just decay . But sometimes they can become part of sedimentary rocks.
As the rock layers build up , the rock becomes solid . The minerals in the rock may replace the minerals in the rock may replace the minerals in parts of the dead bodies. This take places over millions of years.