Hint:Magnet is a piece of iron or it’s a kind of material which produces magnetic field around it and whenever other materials which have this magnetic property comes in contact with this magnetic field they either get attracted towards one magnet or gets repelled by the magnet depends upon in which direction magnet is places
Complete answer: Let us first understand basic working of a magnet in brief: A magnetic material produces a magnetic field around it and this material has two poles called North pole and south pole , the magnetic field lines start from the north pole and end in south pole but inside the material of magnets the direction of magnetic field lines are from South pole to North pole. In this magnetic field whenever materials like magnetic properties tend to attract or repel as per the direction of magnetic field lines.
There are some kinds of magnets which are made from iron and they are made in particular shape and size in order to use in particular places for specific purposes, such magnets are called an artificial magnet. The materials which are used to make such magnets are Iron, Nickel, steel and cobalt.
Note:Remember, inside the magnet the direction of magnetic field lines are always from south pole to north pole .In nature, there are some kinds of magnets which are obtained from cores and minerals naturally , such magnets are called natural magnets such as magnetite, ferrite and columbite. Some common artificial magnets are as bar magnets, U-shaped magnets, ring magnets and electromagnets.