how does a magnetic separation mining work