Answer:
Through repulsion and attraction.
Step-by-step explanation:
Repulsion: Since a magnet has two poles, hold a metal bar and try to connect it to the same pole of a magnet. If it repels, it is a magnet.
Attraction: Take one of the metal bars and try to connect it to a fridge, if it is attracted, it's a metal