A fossil is formed when a prehistoric animal or plant becomes trapped in soft rock.
The rocks form around the remains of the animal or plant which is then preserved inside the rock. The animal or plant also leaves its imprint in the rock.
Strictly speaking a fossil has to be at least 10,000 years old. Anything less than 10,000 years old is considered by palaeontologists (the cool scientists who study these things) to be young.