Mining is considered the most tedious, menial, and grindy job in the game, as it requires lots of patience for extremely low pay.  

Mining has several drawbacks, the standout drawbacks being that many miners are slow and take a long time to fill their holds resulting in long and boring trips for small payouts. In addition, pirates will see a faction with a miner out and declare war in hopes of destroying it. Also, as more players mine the ores, you will have to venture farther from your base in order to mine more ores (although this can be avoided by mining in a VIP server all by yourself and leaving when most ores have been depleted to reset the server and make a new server, thus giving yourself access to a new server full of ores).  

To mine, just get a mining ship and click on an Ore's name box, it will light up and then when you click on the buttons for your Mining Laser/Turrets, or press their hotkey, they will start to mine, after a while either your Ore Hold gets full or the Ore disintegrates. If your Ore Hold is full, find the nearest non-enemy Starbase, preferably your own team or the Mega Base, and dock, then open the Menu and click "Dump Ore". It will pay you for all of or most of your Ore and take all of or most of it depending on how many credits the Starbase has. If the Ore disappears then just find another Ore and start mining until your Ore Hold is full. 

As of update .63h?, players have access to a 2nd option when attempting to dump ore. Through this mining method, at a cost of no credits earned. As of .64h, players can transfer 14% of their mined ores into their warehouse. Loyalty now affects the percentage of ore that is transferred into your Warehouse via this second dump ore option. This method makes more then selling after about 11% loyalty and is recommended for new players in game, although it is still a viable option for all players to use. 

Click here for Ores and Materials.

Mining Turret Statistics

Turret Name Tiny Mining Laser Small Mining Laser Medium Mining Laser Large Mining Laser
Size Tiny Small Medium Large
Range 2500 4000 5500 7000
Mass per shot 6 18 45 150
RobloxScreenShot20171216 155506064

Credits to Dikipi Gamer.