Direction determines attraction or repulsion.
Place two long parallel wires near one another. Each wire creates a magnetic field that acts on the current in the other wire. When conventional currents run in the same direction, the wires attract. When the currents run in opposite directions, the wires repel.
This direction rule is sometimes stated incorrectly. The correct physical result is same direction → attraction and opposite direction → repulsion.

