All the magnetic lines 'connect' the two poles. Direction you are talking about is a convention. By convention , the field lines are taken to direct away from the N-pole and towards S-pole.
Good Luck!!
Regular exam updates, QnA, Predictors, College Applications & E-books now on your Mobile