The correct option is B Magnetic effect
An electromagnet is a piece of metal at the core with wire wound over it. When the current flows through the wire, the metal acts like a magnet. It is based on the magnetic effect of electric current. The metal is magnetized by the current.