A soft iron bar is introduced inside a current carrying solenoid. The magnetic field inside the solenoid:

Iron can be magnetized easily and hence when it is introduced in the solenoid it gives its own magnetic field like solenoid and it is just like a wire passing through the solenoid through which current passes and it develops magnetic field around it.

icore

5