Bar magnets are rectangular and narrow objects that are made up of steel/iron/ferromagnetic materials which have the ability to generate a magnetic field. All bar magnets have two poles: the north pole and the south pole which are painted red and blue for identification purposes respectively. However, in science laboratories, they are painted red completely and the north pole is indicated by a white dot.
From the above picture, one can understand that the iron filings align themselves according to the lines of magnetic force. The lines indicate entry and exit of the magnetic field. The magnetic field leaves from one of the magnets and enters again from another pole of the magnet across the length of the magnet. You can also notice that despite the fact, there are many poles all along the length of the magnet; most of the iron filings are concentrated towards the ends of the magnet. In reality, the magnetic lines of force exist in three dimensions and are not two dimensional
The earth has its own giant magnetic field, which extends hundreds of miles into space and this is what protects the humans, plants, and animals from the harmful radioactive solar winds. The earth's magnetic field is generally compared to the magnetic field of a bar magnet. The earth has two poles, namely the north pole and the south pole. One can find the lines of electromagnetic forces running along the length of earth's poles in a long loopy arc from one pole to another. It is thought that the magnetic field occurs due to thermal convection of the molten metal present deep inside the earth's surface. They keep circulating deep and create powerful electric currents.
Neodymium bar magnets and Alnico bar magnets are important topics to talk about. The primary component of Alnico magnets is cobalt, nickel, iron, and aluminum. Both of these magnets have a very strong magnetic field and they have the ability to retain their magnetic properties even under very high heat. Neodymium magnets are made up of a mixture of neodymium, iron, and boron. Both of these magnets are very powerful magnets but are also very brittle.