If you want to mine minerals, just having planets and using turns will do that, with mining infrastructure researched increasing the amount of minerals you get per turn.
If you want to mine ore, you build mining buildings on the planet you want to get the ore from, and use turns, and you will get the ore. Beware planets only have so much ore, so once it says 0 youll need to find a new planet to mine on, and any mining buildings on it are now completely useless and a waste of land.