Also note that attraction to poles does not apply in uniform magnetic field because there is no poles in it.
If you put a loop with current going through it, the current creates a magnetic field. If you put this loop into uniform magnetic field, the two magnetic fields will try to align with each other, which tries to turn the loop into an attitude where the field lines of the uniform magnetic field and the magnetic field generated by current are aligned, ie. perpendicular to the loop.
Exact same thing would happen to a ferromagnetic piece of metal in an uniform magnetic field. It wouldn't start moving, it would just turn so that the magnetic fields are aligned. For example that's what happens with compass needle in Earth's magnetic field, which can locally be viewed as close to uniform as is within most practical limits. The needle isn't pulled anywhere, it just aligns to the field lines of the Earth's magnetic field at the location. In other words, net force is practically zero when it comes to magnetism, but torque isn't.
That's just uniform magnetic fields, though. When you have two magnets pulling and pushing each other, that's because the magnetic fields are definitely not uniform, which causes all kinds of interesting things to happen as the magnets try to set themselves up into a position where they have the least energy potential possible.