Like poles (north-north or south-south) of magnets repel each other, while unlike poles (north-south) attract. This is a fundamental property of magnetic fields and follows the principle that magnetic field lines from like poles diverge, creating repulsive force.