The composition of magnet is iron, cobalt, nickel and other atoms. The internal structure of its atoms is relatively special, and it itself has magnetic moment. Magnets can generate a magnetic field and have the characteristics of attracting ferromagnetic substances such as iron, nickel, cobalt and other metals.
Magnets are divided into permanent magnets and soft magnets. Permanent magnets add strong magnetism to make the spin of magnetic materials and electron angular momentum arranged in a fixed direction, while soft magnets add electricity. (also a method of adding magnetic force) the soft iron will slowly lose its magnetism when it is removed by current.
Hang the midpoint of the bar magnet with a thin line. When it is stationary, its two ends will point to the South and north of the earth. The end pointing to the north is called the north pole or N pole, and the end pointing to the south is the guide pole or S pole.
If we imagine the earth as a big magnet, the geomagnetic north pole of the earth refers to the south pole, and the geomagnetic South Pole refers to the North Pole. Between magnets, magnetic poles with the same name repel and magnetic poles with different names attract. Therefore, the compass repels the south pole, the North needle repels the north pole, and the compass attracts the North needle.