When two pins are hung by their heads from the same pole of a magnet, their pointed ends move apart because the iron nails by magnetic induction gets magnetized and develop same poles. As we know that like poles repel each other hence, the two pointed ends of the nails repel each other.
![MAgnet](https://flasheducation.online/wp-content/uploads/2024/04/MAgnet.jpg)