Magnets are objects that can produce a magnetic field. Moving electrons generate magnetic fields, and the fields consequently fill the space around the magnet, where they can attract or repel magnetic materials
Uses of Magnets
Magnets and their magnetic fields are very useful in industry, especially to store information. Video tapes, computer disks, and other storage devices use magnets. The magnets work in such a way that information can be recorded on the device by creating patterns on the magnetic fields of the magnets inside the device.
There are a few naturally occurring magnets, but the most common ones are iron, cobalt and nickel. However, by creating alloys including these metals, magnetic substances can be created. There is a difference between magnets and magnetic materials; magnets can attract or repel other magnets, as well as magnetic materials. However, magnetic materials can only be attracted and repelled to magnets. Magnetic materials do not have a magnetic field around them.
A bar magnetic is typically made out of either iron or steel. It has two poles; a North Seeking Pole and a South Seeking Pole. These types of magnets are permanent magnets. If you brought a North Pole to a South Pole, they'd attract, so if you brought a South Pole to a South Pole, they'd repel and vice versa.
Wandering widely, the Earth's magnetic poles are quite unlike a bar magnet; this is due to our Earth's core is filled with molten iron (Fe). This field is different also because the magnetic field is created by the movement of the molten iron in Earth's core, from the constant rotation. This large field protects Earth from particles -e.g. solar wind- and space radiation by repelling those particles.