There are two types of rocks which can be found.
Large Mineral Rock[]
Metal Ore, Sulfur Ore, and Stones can be gathered from a Large Mineral Rock using any tool, each swing will produce 2-4 Metal Ore, some Sulfur Ore, and 4 Stones.
If you are using a pickaxe, each swing will yield more resources and you will need no more than 3-4 swings to collect the entire rock.
Small Mineral Rock[]
Metal Ore, Sulfur Ore, and Stones can also be gathered from smaller mineral rocks dotted around the map, but in smaller quantities compared to the Large Mineral Rock. Usually 3-7 more Sulfur Ore and 4 Stones are found in these rocks.
Using a pickaxe the same rules count as with the Large Mineral Rock - 3-4 swings to collect the entire rock, therefore also giving you much more material per hit.