Its a combination of the grip rule and the palm rule. Essentially when there is a current carrying conductor, we can deduce that one side of the conductor has field lines going in and the other has field lines going out. The direction of the magnetic field will be opposite for both conductors in the area they border. This is something that can be found using the grip rule. After this, we can use the palm rule to individually calculate the force it exerts using the direction of THAT INDIVIDUAL CONDUCTOR'S field lines go (into or out of). This direction will be opposite that of the other conductor, but after using the palm rule, it will result in the conductors exerting force towards each other (palm facing the other conductor), which results in the attraction force.