When two magnetic fields are near to each other they interact and produce a force. As currents all have magnetic fields around them, forces are produced when two currents flow near to one another. The effect of two long wires each carrying current is shown in the following diagrams.
Current flowing in opposite directions:
This shows two wires carrying current in opposite directions (unlike currents). The strong field in between the two wires (shown by the close field lines) produces forces that push the wires apart.
Currents flowing in the same direction:
This shows two wires carrying current in the same direction (like currents). The relatively weak field in the space between the wires here means that forces are produced which push the wires together.
|Like currents attract|
|Unlike currents repel|
Note: This is opposite to the rules for electric charge and magnetic poles!
Obviously, the greater the currents in the wires the greater the force produced. This gives us the definition of the ampere as:
One ampere of current is flowing through two infinitely long, straight, parallel wires, of negligible cross-sectional area, when a force of 2 x 10-7 N is exerted on each metre of the wire, when they are placed one metre apart.
(I think that is the longest definition in any of the AS or A level courses!)