A magnet is an object that attracts metals like iron, cobalt and nickel using its magnetic field, which exists around the magnet itself. The magnetic field has magnetic lines of force, going from north pole (N) to south pole (S) of the magnet. Any magnet will set itself parallel to the lines of force, and this is why magnets can repel or attract magnetic materials, depending on the north-south position of the magnetic lines of force. Magnetic lines of force gets closer to each other and both poles but their distance are relatively further at other areas, just like the longitude on the Earth. (Notice that the longitude lines converge at both ends!!!!)
The magnetic property of a natually-formed magnic can either be permanent or temporary. Permanent magnet are also called hard magnets. Their magnetic property can be retained forever and that is why they are called "hard magnets". Temporary magnets are magnetized temporarily and can only create magnetic fields when they are under the influence of a hard magnet's field, but they can retain its magnetic property for a short period of time after leaving the magnetic field of a hard magnet. They can be easily demagnetized. Based on this property, we can magnetize and demagnetize screw drivers based on our needs.
Another type of magnet is electromagnets. Its magnetic property is caused by electricity. And that is why we hear terms like electromagnetic field. Electromagnets are extremely useful. We use them in motors, computer hard drives, speakers, and many devices in hospital. Besides these, there are many other uses of electromagnets. We use electromagnets because its magnetic property is easy to control. The strength of electromagnets can be controlled by the number of coils and strength of current.