First of all, as the world evolves, the terrain goes through big changes, so practically the answer appears to be "It's random."
Your question is very broad, as each resource is generated differently. But as you have mentioned fossil fuels, I can use it as an example.
Fossil fuels come from enormous amounts of dead lifeforms (more or less). So in the first place, they appear where there were big concentrations of life in the past (normally near the equator or warm places): for example, big forests, lakes with many lifeforms, or the delta of a river. Then they must be covered by soil: so for example, the terrain is buried by a volcano, or the terrain is covered by dust from wind. It must be covered to a great depth so there is enough pressure. Then it must be there for a very long period of time (so you can't burn a forest, cover it with sand, and the next month dig to find carbon). And then it must reemerge (or people dig to find it). In this process, tectonic plates can move around: for example, a forest that was on the equator can reappear in carbon form at the north pole.
On the other hand, precious metals were created when the galaxy or planet started to form (gold and uranium, for example, come from exploding stars), so they appear wherever they got merged into the planet. And keeping in mind that the ground is moving all the time, you find them in many places. But normally you find them concentrated in small areas.
More or less you can see that resources are generated in specific situations and places, but then they move around the world and can appear anywhere. So you can place them where you want, but then you may need to assume that the resources of this region formed in some other place.
Edit Reading the other answer, I got in my mind that I have to mention that the resources are randomly distributed, but the people are not. People settle where the resources appear. For example, in prehistory they settled where there were animals to hunt or fruits to collect and water to drink. Towns have been made near gold or coal mines so people can waste less time far away from home when working. And when people have settled where a resource can't be found, but other people have it, well, then or war or commerce happens (as moving a city is a little difficult ;) ).
A curious fact is that under specific circumstances a star can collapse and form a giant diamond, so somewhere in space will be a big, big, big diamond.
You can find more about the generation of precious metals on Wikipedia: Supernova nucleosynthesis.
And also check Wikpedia for other resources like carbon.