Keeping the three directions in mind: current; field; force
Hans Christian Ørsted (1777–1851) was a Danish physicist and chemist who is most widely known for observing that electric currents produce a magnetic field. In the case of a straight conducting wire, the magnetic field lines are circular in shape, centred on the line of the wire.
When a current-carrying wire is placed in the space between two attracting magnets a force acts on the current-carrying wire. This is perhaps not surprising since the current-carrying wire is a magnet and it therefore experiences a force when placed in a magnetic field. What is surprising is the direction of the force on the wire.
The force on the current carrying wire: