When a current flows through a solenoid, it produces a magnetic field that has a definite direction. The magnetic field lines inside the solenoid run from the South to the North pole, while the magnetic field lines outside the solenoid run from the North pole to the South pole. This is the direction of the magnetic field outside a current-carrying solenoid.