Magnetic sensors operate based on the principles of magnetoresistance, Hall effect, and Magneto-optical effect. At the nanoscale, these effects are significantly amplified, allowing for highly sensitive detection of magnetic fields. The core components may include nanoscale ferromagnetic materials or nanostructures that respond to external magnetic fields.