When you assign a high level to the module pin, the electro magnet can suck magnetically conductive objects. Otherwise, it will release the object.
An electro magnet is a type of magnet in which the magnetic field is produced by electric current. An electric current flowing in a wire creates a magnetic field around the wire, due to the Ampere Law. To focus the magnetic field on an electro magnet, the wire is wound into a coil with many twists of wire side by side. The Magnetic Field of All Twists of the Wire passes through the Coil Center, creating a Strong Magnetic Field there.
It's Easy to Use to Learn the Electro Magnet Principle.