Metals and materials that contain metal can be magnetized either temporarily or permanently. Creating a temporarily magnetized metal can be achieved by bringing that metal in close contact with an already magnetized metal or by charging it with an electrical current. Permanent magnetization can occur by rubbing the metal with the poles of already magnetized materials or by hitting a metal while it is in a magnetic field.
One way of creating a permanent magnet is to place it within the magnetic field of a single object, such as a compass or between two polar opposite magnets, then striking the object several times until it becomes magnetized. The second method involves using the north pole of a magnet to stroke one side of the metal, while using the south pole of a second magnet to stroke the other side.
A similar method can also be used to temporarily magnetize a metal by using either only the north pole or the south pole of a magnet. The metal will temporarily orient to the opposite pole. Using an electrical current, a temporary electromagnet can be created by aligning the domains of the metal's particles. However, the domains only remain aligned when the electric current is active.