process of mining and refining metals from their ores is called