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

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. 

Click here for Ores and Materials.

Mining Turret Statistics

Turret Name Small Mining Laser Medium Mining Laser
Size Small Medium
Range 3000 4500
Mass per shot 6 15
RobloxScreenShot20171216 155506064

Credits to Dikipi Gamer.