An electromagnet - is essentially a metal 'core' encased in wire. When power is applied to the wire, the core becomes magnetic - when the power is turned off, the magnetism is lost. Think along the lines of a crane in a scrap-yard. The crane has an electromagnet attached to its lifting arm. The operator switches on the magnet to lift a load of scrap metal, and switches it off to drop the load.