When two parallel conductors carry current in the same direction, they produce magnetic fields around them. According to Ampere’s Right-Hand Rule, the magnetic field due to one conductor exerts a force on the other. By Laplace’s Force Law, the two conductors experience an attractive force because the magnetic field of one conductor exerts a force that pulls the other closer.
If the direction of current in the conductors is opposite, the magnetic field lines between them will repel each other, resulting in a repulsive force between the conductors.