The Earth is a huge magnet. Billions of positively charged atoms produce negatively charged electrons, which spin around the core of an atom and create a magnetic force, transforming the fragment into a minuscule magnet.
The substance is more or less magnetized in the external magnetic field, except that the degree of magnetization is different. Iron is a ferromagnetic material. There is a particular interaction (restriction) between the magnetic moments of close atoms or ions in a ferromagnetic material, which causes the magnetic moments in some regions to be aligned in the same direction, thus forming a magnetic domain and magnetic properties in the magnetic fields. Very strong. There are many such magnetic domains inside the material, but the magnetic moment orientation of the different magnetic areas is random, and the material as a whole does not exhibit ferromagnetism. The main reason for the magnet attracting iron is that the iron itself spontaneously magnetizes and forms a spontaneous magnetization region, that is, a magnetic domain. After the ferromagnetic substance is magnetized, the internal magnetic fields are aligned neatly, so that the whole body exhibits magnetism and can be attracted by the magnet.
Aluminum is a paramagnetic substance. The magnetic moments are disorderly arranged. After the external magnetic field is applied, the magnetic moment tends to be consistent with the external magnetic field, but the consistency is not strong with ferromagnetic materials, so magnets can’t attract Aluminum.