Mining is a very tiresome, boring, pointless and neglected feature of Frontier. For the effort put in, you rarely get anything out of it. However, if you are bored with the rest of the game, here are a few tips.
A solitary life
A barren landscape and a solitary MB4 mining machine.
Ideal locations for mining with the MB4 machine are discussed in the manual; the planet(oid) must not be hotter than 250 degrees Celsius and naturally it helps if it is large enough to land on without your ship going Boom! Apparently, the mass of the planet should also be bigger than the Earth, about 1.5 to 2 times as big to guarantee any reasonable deposits, but this is a trend which remains to be fully explored. Having found your planet, land there (requires skill if the planet has high gravity. Just be slow and careful and make sure your ship is level and not descending too fast) and deploy the MB4 up to about 30 times or so to make sure it comes across some reasonable deposits. You can get minerals which are fairly common, water ice, or a metal seam. Eventually the MB4 will have filled the hopper with either crap or goodies which you can then take to a starport and sell off.
You'll need a fairly big ship (to accommodate a 30MW mining laser). What happens is you pilot the ship to within 3-5 km of the target asteroidal body, make sure whatever part of your ship has the mining laser is facing it, and blast away merrily. Then scoop up whatever is given off from blasting the asteroid. This can give quick returns as some do actually have Precious Metals and Gem Stones, but some can (and do) give off rubbish, quite literally. Requires a certain degree of manual piloting skills. Beware of doing this in systems such as Sol where mining (except gas giant scooping) is illegal. Also, if you use the Star Dreamer time control, make sure that your velocity is relative to whatever you are blasting, as speeding things up could (and sometimes does) make the object smash into you.
Thanks to Stuart Wilson for the information on this page.