Push, or pull?
Two magnets meet end to end. Sometimes they pull together. Sometimes they push apart.
Loading lab…
The idea
Opposite poles face each other: N with S. They pull together. This is attraction.
Matching poles face each other: N with N, or S with S. They push apart. This is repulsion.