Opposite charges attract to each other and like charged repel against each other.
So if there was 2 magnets and they were both facing each other on the north sides, they would repel. But if there was 2 magnets and 1 of them was faced towards the south and 1 of them was faced towards the north, then south and north will attract as they are opposite.