For magnetization, a direct current flowing into a solenoid (a long insulated wire coiled into a cylinder) produces a magnetic field that, inside the coil, is uniform in strength and direction.
A steel bar placed inside the coil for a short while becomes magnetised due to magnetic induction from the solenoid.
Magnetisation by electric current method creates more powerful magnets than other magnetization methods such as stroking.