The torque coils work against the magnetic fields of the Earth to turn the spacecraft, in the same way that two bar magnets will cause each other to move by repelling forces.
(two bar magnets; will cause; each other; to move by repelling forces)
two bar magnets
will cause
each other to move by repelling forces