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