Fossils are remains or impression of a prehistoric plant or animal embedded in rock and preserved in petrified form. These are obtained when some parts of plants or animals get buried and covered by a layer of sediment and as animals have hard bony structures, they didn't rot under certain circumstances and again get encased by a layer of sediment forming fossil with passing time.
Fossils act as a evidence of evolution because they represent or explain the characteristics of organisms living at that time on earth and by comparing differences and similarities between the characteristics of fossils and present time organism scientists can draw a line of evolution.