Steel cans are separated from other materials using magnets, which attract the ferrous (iron-containing) steel. Aluminium cans, being non-ferrous, are separated by eddy currents created by magnets that repel them, allowing efficient sorting.

Kind regards,
Murphy