Press the M key to select the mine tool and highlight the area of which you want your miner to mine. This only works on asteroids. You must have at least one miner preferably three stars or higher. Mining is usually the second thing to do.
To gain matter from mining, you need refinery. This is were asteroid chunks are converted into matter.