process of extracting minerals from the earth