(a) Iron is a conductor of electricity, hence current is able to pass through the rod making it an electromagnet.
(b) the electromagnet is able to attract metal pieces while not attracting sand as sand is not a conductor of electricity, when the electromagnet from the crane mixes with the pile, only the metal pieces will stick to the electromagnet, while sand is not attracted. hence when the crane moves to X, metal pieces are separated from sand. deactivate the electromagnet to release metal pieces from being attracted to the electromagnet onto the collection point.
(c) no, if the electromagnet is replaced by the magnet, metal pieces will remain stuck to the magnet as the magnet cannot be switched on and off like an electromagnet, hence a magnet will be unable to perform this function of separating sand and metal pieces due to its inability to attract and release the metal pieces