an electromagnet is a (permanent,temporary) magnet.
an electromagnet will be a magnet until an electrical current around it exist, namely an electromagnet is a piece of iron surrounded by a coil. In that coil an electrical current flows. Now if that elecrtrical current exists, then our piece of iron will be a magnet. When that electrical current will be canceled, in our piece of iron will remain a residual magnetization: that is the phenomenon of magnetic hysteresis. @Katie.seagle1
An electromagnet doesn't need to have an iron core. The answer to the question being asked is that it is a temporary magnet, because the magnetic field it creates only exists as long as the current flows. Your example is that of a permanent magnet (the iron core) inside a temporary magnet (the electromagnet).
Join our real-time social learning platform and learn together with your friends!