Magnets have a north pole and a south pole. The same poles of two magnets repel each other, while different poles attract each other.