Attraction and repulsion are the properties of a magnet. Attraction takes places when we bring a magnetic material near a magnet or when two opposite poles of a magnet are near each other. But repulsion takes place only when the like poles of the magnets are near each other. Thus, repulsion is a sure test of magnetism.