The poles of a magnet come from the fact that what you are dealing with in permanent magnets you are dealing with magnetic dipoles. You can have electric dipoles, too, with a positive and a negative end of the dipole, and the electric field lines look exactly the same as magnetic dipole field lines.
For a moment, forget about permanent magnets and just consider magnetic fields derived from electric currents. You have the magnetic field that curls around the wire, and that's easy enough to picture as long as you're not trying to think of where the poles are. Now take the wire, cut off a small section and take that section and make it a circle, with the same current flowing through it. If you look at the magnetic field lines there, they form sort of a donut around the circle, with the exact center having a stronger field line pointing in from one side and out the other.
For reference, the field lines point out of the "north" side and into the "south."
Anyway, if you take that current carrying wire and reduce its radius and reduce the current proportionally, then you will see that same structure, but with the magnetic field in the center having the same strength as before. Shrink the radius again and again, reducing the current by the same proportion every time, and when you have shrunk the radius to 0 you have a magnetic dipole. Now imagine a whole bunch of those trapped pointing in the same direction inside of a bar. That is essentially what a permanent magnet is. The electron has a relativistic quantum mechanical property called "spin" which is the cause of the magnetic dipole.