How are electrons in certain metals (like iron) magnetized and can act like magnets, but the metal itself isn‘t a magnet?
Magnetic fields are produced when electric charges are moving. Since atoms have orbiting electrons, a magnetic field is present. In the case of iron and other magnetic materials, its inner electron shells are unstable and the electron spins are alligned.