As the word relative tells that defining the object with respect to the other object, it will be pertinent to mention here that actual numerical dates of the rocks or sites are not known in this type of dating.
Using relative dating the fossil is compared to something for which an age is already known.
For example if you have a fossil trilobite and it was found in the Wheeler Formation.
The Wheeler Formation has been previously dated to approximately 507 million year old, so we know the trilobite is also about 507 million years old.
Index fossils are fossils that are known to only occur within a very specific age range.
Typically commonly occurring fossils that had a widespread geographic distribution such as brachiopods, trilobites, and ammonites work best as index fossils.