Opposite poles of a magnet attract each other, whereas like poles repel each other. When lined up with a south-seeking pole, a north-seeking pole would draw closer to that end of the magnet. However, when lined up with another north-seeking pole, the two magnets would push away from each other because their forces are not compatible