Neodymium magnets are magnetized at their time of manufacture. The manufacturer decides how the line (or axis) should intersect the magnet with a magnetic pole at each end. Spherical magnets are magnetized with an arbitrary point chosen as the north pole and another (antipode) chosen as the south pole. For any shape other than the sphere, however, the line about which the material is magnetized, can make a difference.
In general, materials are magnetized either axially or diametrically, with axially magnetized materials possessing a magnetic field though its two largest, flattest faces (or an arbitrarily chosen pair in the case of cubical magnets) and with diametrically magnetized materials having a magnetic field that passes through its ‘diameter’ as can be visualized as passing through the edge of a disc magnet, rather than its face. This would mean that if two diametrically magnetized magnets were brought together, their edges would attract most strongly, whereas in axially magnetized magnets, their opposite faces will attract each other.
Orders of Mangetude currently only sells axially magnetized magnets (as well as spherical magnets), as they are ideal for general purpose use. Magnets that are diametrically magnetized usually have specialized, much more specific uses, such as components of motors.