Two electric current carrying units would exert a magnetic force on one another.
We know that an electric current produces a magnetic field in its surroundings.
The magnitude of the magnetic field may be given using Biot-Savart law or Ampere's law.
From Lorentz force law, one finds that a magnetic field is capable of exerting a force on a moving charged particle.
So consider two wires in each other's vicinity, both carrying a certain current and hence producing magnetic fields of their own.
Now, electric currents are constituted by the flow of electric charges. So, the magnetic field produced by wire 1 interacts with the moving charges inside the wire 2 and exert a Lorentz force.
That is what precisely happens.
By Newton's third law, the field of wire 2 inturn exerts a similar force in opposite direction on the charges moving inside wire 1.
Quantitatively analysing the simplest case where two parallel long wires carry currents
Using Biot-Savart law or by Ampere's law that the magnetic field by first wire at the location of the second is,
Also, by Lorentz force law, one obtains that for wire 2 carrying current
Since in this case the magnetic field is in circumferential direction and the direction of current perpendicular to it, the magnitude of force is,
Thus force per unit length of the second wire would be,