The current is travelling along the wire and the magnetic field from the permanent magnet goes from left to right. The field from the permanent magnet and the field due to the current in the wire combine and there is a force on the wire. The current, the magnetic field and the force are all at right angles to one another.
If the current and the magnetic field are parallel to each other (ie they are in the same direction) they cancel each other out, and no force is generated. This is because the wire is not passing through any magnetic field lines.