Scientist usually use the process of relative dating to begin with, then chemical dating. They look at where the environment that they found the fossil to determine if it has always been that environment. ie i found fossils of marine life in a country town suggesting that the environment was previously a marine environment.
They study the rocks that we found the fossils to help determine a relative age. ie this came before that, but after them to give us an approximate age. they then study the fossil itself to classify it into groups to determine which branch of evolution it has come from.
Fossils can be found in rocks, bedding planes,(rock layers), trees (tree ring dating). mostly there are found in rocks or weathered rocks (sands, mud).