An electromagnet can be used a couple of ways.
It can be used on the end of a crane, to pick up large pieces of metal to be moved into shredders, or restacked for transportation, crushing, etc.
It can also be used to separate metal from non-metal pieces. Usually, these types of magnets are on a conveyor belt, and will cull metal from, say, plastics or other non-ferrous metals such as copper, and aluminum.