Fossils are the remains of Pokémon from millions of years ago. They are obtained from mining Fossil blocks, which are found between height levels 20-50 in gravel piles. They're fairly uncommon finds so it may take a while to find one. They will generate before any gravel in the world begins falling due to gravity so keep that in mind while searching. Fossil blocks are not affected by gravity.
When mined, the fossil block will always yield one of the nine possible covered fossils. These covered fossils can be cleaned in a Fossil Cleaner by right-clicking the fossil cleaner while holding a covered fossil.