Magnetic nanoparticles can be controlled using external magnetic fields and are used in magnetic resonance imaging (MRI). When functionalized with targeting molecules, these nanoparticles accumulate in cancerous tissues, enhancing the contrast in MRI scans and aiding in the accurate localization of tumors.