If two magnets are brought close together they exert forces on each other. If the north pole (N pole) of a bar magnet is brought near the N pole of another suspended magnet moves away. There is repulsion between the two N poles. Repulsion also occurs when two south poles (S pole) are brought near each other.But if N pole is brought near a S pole they are attracted to each other. The results lead us to the laws of magnetism which can be summarized as follow :
Like poles repel each other.
Unlike poles attract each other.