The magnetic pole is the location at either end of a magnet with the greatest externally applied magnetic field.
Whenever a bar magnet is hung mostly in the earth's magnetic field, it will arrange itself north-south.
Explanation:
The magnetic field lines that surround a current-carrying straight conductor are concentric circles.
When you place one magnet's north pole close to the south pole of another, these same field lines go directly from the north pole of the very first to the south pole of such a second, and users experience an attractive force seen between two magnets.
Therefore, the poles of a bar magnet are located at their two ends.