When a bar magnet is inserted into a solenoid, the solenoid will cut the magnetic flux of the bar magnet. This will induce a current and emf in the solenoid.
The induced current will produce another magnetic field around it.
The pole of the magnetic field and direction of the induced current can be determined by using Lenz’s Law as explained in the video below.