if battery in an electromagnet is active then the nail in the electromagnet will become magnetic & the teacher connects the unwire ecosystems an tin hammer to a compress ->  the iron nail will become magnetic