Matter is primarily composed of molecules, which are made up of atoms, and atoms consist of a nucleus and electrons. Inside an atom, electrons spin and orbit the nucleus. Both these movements generate magnetism. However, in most substances, the directions of electron movements are diverse and chaotic, causing their magnetic effects to cancel each other out. As a result, most materials do not exhibit magnetism under normal circumstances.
Iron, cobalt, nickel, or ferrites, and other ferromagnetic materials differ in that their internal electron spins can spontaneously align within a small range, forming a spontaneously magnetized region known as a magnetic domain.
After magnetization, ferromagnetic materials have their magnetic domains neatly aligned and oriented, which strengthens the magnetism, forming a magnet. The process of a magnet attracting iron is the same as magnetizing the iron block. The magnetized iron block and the magnet, with opposite poles, generate an attractive force, causing the iron block to firmly adhere to the magnet. We say that the magnet has magnetism.






