Step-by-step explanation:
Magnet has two poles: (1) North pole and (2) South pole.
Like poles repel each other. If the like poles are interacting each other then there will be force of repulsion in between these poles.
Unlike poles attract each other. If the unlike poles are interacting each other then there will be force of attraction in between these poles.
S-S and N-N magnetic poles repel each other.