Two like magnetic poles repel each other.
The two ends of the magnet are known as poles. One end is known as the north pole while the other end is known as the south pole.
When two north poles or two south poles are brought together, they repel. But when one north pole and one south pole is brought together, they attract.