The correct option is D attract,repel
All atoms have positive protons in the center, called the nucleus, with negative electrons spinning around the nucleus.
Nonmagnetic atoms have electrons that spin in all directions. The electrons in the atoms of magnetic material spin around the nucleus in mainly only one direction. This creates a more negative side and a more positive side in the magnet which makes the north pole and the south pole of the magnet. This difference creates a high attraction on one side of the magnet where the electrons are spinning to the other side of the magnet where the electrons are not spinning.
This magnetic force flows from the north pole to the south pole outside of the magnet. This flow creates a magnetic field around the magnet. The force is stronger closer to the magnet.When we join north pole to south pole of different magnets makes the electrons all spin in the same direction. That is a strong attraction. On the other hand when we join south pole to south pole or north pole to north pole is like trying to force the electrons to reverse the direction that they are spinning. That is why the like poles repel each other.
Hence, Unlike poles attract, while like poles repel each other.