An electromagnet is only magnetic when there's current going through
the wire. If there's no current flowing, then the electromagnet is just a
lump and doesn't attract anything.
The strength of the electromagnet depends on the amount of current
that's flowing through the coil of wire around it.
Changing the current immediately changes ==> the magnitude of the
magnetic field, ==> the strength of the electromagnet, and what it's
able to pick up.