It can only do that when one of the components of the mixture is a magnetic
material.
When you have that situation, you pass the magnet over the mixture ... shaking
the mixture if it's a dry mixture of powders or pieces ... and the magnetic part of
the mixture moves toward the magnet, while the nonmagnetic parts of the mixture
couldn't care less about the magnet and they just stay where they are.