process of obtaining pure metal from its ore