If you are someone who likes farming, mining is a good option in classic. From leveling it as well as from max level farming there are some things you can do to maximize the value of the materials you obtain.
What materials do you get
When mining you get ore, a stone type and you have a chance to get gems. The ores can be melted into bars that are used primarily by blacksmiths and engineers. The stones are also used primarily by blacksmiths and engineers, with engineers using most of them for blasting powders. The gems vary wildly in value, with low level gem types barely selling for more than the vendor value.
At max level the main way you make gold with mining is to farm Rich Thorium Veins for Arcane Crystals. This is by far the most valuable rare gem you can get from mining and it will dwarf the value of thorium and Dense Stone. For max level crafters there are some ores and stones that really stand out. The most used ones are_ Dense stones and Thorium bars for Thorium Shells, Thorium ore for Greater Stoneshield potions, mithril bars and solid stones for Sapper charges and Heavy Stone and Iron Bars for iron grenades.
Melting ore into bars
For the most part you want to melt ores into bars before selling them. The main situation where you want to sell the ores directly is for the ores that can be melted for skill points. Here the ores will often sell for more than the bars as they are very useful for players looking to quickly level mining. The ores in question are: Copper, silver, iron and gold. Gold in particular sells for significantly more as an ore on my realm at least.
For the other ores you are generally better off melting the ore into bars before you try selling it, the finished bars for these ores are generally much more useful and has higher demand.
Flipping ore into bars
Buying ore to melt it down is something I have done successfully in the past in retail WoW. Overall the profit margins are very thin doing this in classic, but you can do it if you want some extra gold. This will mostly be relevant for the ore/bar combinations that are useful in crafting. On my realm melting mithril and copper bars are both profitable. The rest of the ores are not looking particularly profitable however.
Selling the gems
Most of the gems that drop from mining are fairly low value. Most of them barely sell for more than the vendor value. The most valuable one by far is the Arcane Crystal from Rich Thorium Veins, and this is really the main reason to even do farming. The best way of getting rich Thorium veins is typically to do Dire Maul East Jump runs, as there are two guaranteed Rich veins at the end. Some classes can solo this, and tanks can typically duo this with a healer. Either way it is a great option for getting high value out of mining.