(N/A) solenoid is a cylindrical coil of many tightly wound turns of insulated wires,where the length of the coil is generally much greater than its diameter.
When an electric current is passed through the solenoid,a magnetic field is produced around and inside it.
The magnetic field lines produced by the solenoid are similar to those of a bar magnet. Since the current in each circular turn of the solenoid flows in the same direction,the magnetic effects of individual turns add up.
As a result,one end of the solenoid acts as the North pole $(N)$ and the other end acts as the South pole $(S)$,similar to a bar magnet.
The figure below illustrates the magnetic field lines of a current-carrying solenoid: