A recycling facility uses a conveyor belt system to separate mixed copper rivets and iron nails.
The mixture is carried along a moving belt which passes over a magnetized roller, as shown in the diagram.

Explain how this system separates the iron nails from the copper rivets.