There are four different types of resources: Gold, Metal, Stone and Crystal. The way each race use these resources can vary greatly. However, it should be noted that crystal is closely associated with magical researches and units so denying your opponents their crystals is usually a good idea for stalling their 'magical' strategy. Beyond that, it is necessary to understand each specific race to master its resource management.
Acquiring resources for yourself can be done in one of several ways. The main way to do it would be to simply convert mines with your Heroes. The speed of conversion depends on your Dexterity while the radius is determined by your Command radius. There's typically one of each resource mines near your starting location, but they may be spread quite far apart. For this reason, it's vital for almost all heroes to get a decent command radius so you do not have to convert twice to get all the starting mines. This is especially true since these starting mines are usually level 3 so they give a nice steady stream of income that you want as soon as possible. Some of the mines that are away from your starting location may have lower levels, which gives less income. Alternatively, a hero with access to the Acquire spell (Alchemy sphere) or Lysean Staff may consider using it to accelerate mine conversion.
The hero is not the only unit that can convert mines. Generals and the Phoenix unit have the ability as well but are hampered by a small radius of conversion. Additionally, generals also only arrive very late in the game. Hence, it's a good idea to have at least one general unit in your retinue to assist in early game mine conversion.
Once you have converted some mines around the map, it's beneficial to increase the income rate. Some races do this by stuffing individual mines with "workers" who are usually just your builder units. You can even use summoned builder units to do this. The Undead Necromancer, for example, is an excellent practitioner of this method. Simply select your builder units and right click on a mine. Avoid doing this for far away mines that you cannot defend as the workers you invested may be wasted if you lose control of the mine. Note that the workers *seem* to increase income in a fixed way meaning that they give you comparable benefits regardless of mine level. (Specifics to be verified).
Other races, like the High Elves, depend on global income research upgrades and so they need not fear "wasting" their workers investment. On the downside, these global income researches cannot be micromanaged. Meaning that you cannot prioritize a specific resource by investing workers in only that resource.
Of course, there are also races who get the best of both worlds like the Fey who can use mine fillers and have good global income upgrades.
Another way to gain resources apart from mines lies in the special abilities of certain units, hero skills and items. For instance, the leprechaun functions as a level 1 gold mine while the ancient wisp grants a steady trickle of crystal. The same goes for hero skills such as wealth and items such as the leprechaun's lyre. In fact, certain heroes are so adept at supporting a race through these "resource skills" that entire strategies can revolve around it. The Dark Dwarf Tinker and Fey Merchant are good examples of this.
We've talked about resource acquisition, but resource expenditure is equally important. The charisma-influenced merchant skill is notorious for offering huge discounts on all your resource expenditure. The divination spell "comprehension" also offers large discounts, but only for upgrades.
As you acquire more and more resources, you will eventually hit a resource cap at 1000 of that particular resource. This cap can be increased via upgrading your keep, with each level allowing you to store an additional 500 resource.
Beyond the four basic resources, one can also consider the harmless animals and corpses as resources. The corpses are usually used for the undead liches or resurrection spell. Animals are resources to several races such as the fey and minotaurs. The minotaurs can consume animals for healing and curing. The fey towers and celestial dragon can crystallize the animals, turning each harmless little seal or camel into 100 crystal! A good Fey player should always keep an eye on the minimap in the early game to kill any animal that strays near their tower. It's cruel but it will grant a MASSIVE advantage, particularly on certain maps such as "winter wonderland". Whoever could have suspected that the little faeries were so sadistic? The celestial dragon should change its alignment to evil.
There are other ways that resources can be affected, such as with the Thief skill or with the Swarm's endgame famine antics but these tend to be rather rare.