1. Take two similar bar magnets.
2. Bring the south pole of a bar magnet close to the south pole of another bar magnet. They repel each other.
3. Now bring the north pole of a bar magnet close to the north pole of another bar magnet. They also repel each other. This confirms like poles repel each other.
4. Now bring the south pole of a bar magnet to the north pole of another bar magnet, vice versa. They attract each other confirming that unlike poles attract each other.