Basically, magnets are elements which can generate a magnetic field which helps to pull a certain material or repel materials like iron and nickel. Magnets are not always made of …