Magnets are defined by their ability to align atomic magnetic fields, which results in a net magnetic effect, unlike non-magnetic materials like apples where atomic orientations cancel each other out. While everything has a weak magnetic field, materials like apples are diamagnetic due to their water content and lack of unpaired electrons. The presence of unpaired electrons in elements such as iron, cobalt, and nickel contributes to their magnetic properties, with the quantum mechanical exchange interaction favoring alignment. Not all alloys of these elements exhibit ferromagnetism, and the complexities of magnetism are still not fully understood, despite extensive research. Ultimately, a magnet's ability to attract ferromagnetic materials is what classifies it as such.