Magnets attract materials like iron because they have unpaired electrons that align with the magnetic field. When placed in a strong magnetic field, these materials can become temporarily magnetized. Materials without free electrons, such as paper or plastic, do not get attracted.