Stroking Method
The diagram on the left shows a unmagnetised steel bar being stroke several times by a permanent magnet.
Notice that the bar is stroked every time by the same pole (N pole) of the permanent magnet. The magnet is lifted sufficiently high above the steel bar between successive stoke.

The steel bar would eventually become a permanent magnet by magnetic induction.
Note that the pole produced at the end of the steel bar is opposite to the stroking pole used.
We will explore which magnetic material would make good permanent magnets later.

Stroking method with 2 permanent magnets
A steel bar can also be magnetised by using two permanent magnets. This would speed up the magnetising process. Take note of the poles of the two magnets stroking the steel bar. They are of different polarity. It is important that this procedure is taken to ensure the proper magnetisation of the steel bar. 

Figure A

Figure B

Electrical  Method using a direct current (D.C.)
In Figure A above, a steel bar is wrapped with a cylindrical coil of insulated copper wire known as a solenoid. Solenoids usually have several hundred turns of the copper wire. When a direct current (D.C.) is passed through the solenoid, the steel bar would become a magnet after a while.
Wires with current passing through them would produce a strong magnetic effect by the current. This would in turn magnetise the steel bar in the case mentioned in Figure A. We will explore the magnetic effect of a current later.
The poles of the magnet can be determined by a simple method known as the right-hand grip as seen in Figure B.
Note that this method is not a concept but a tool to help determine poles of induced magnets by electricity.