What technique uses magnetic fields to investigate structures of the brain?

The technique is called MRI or Magnetic Resonance Imaging

for more info on MRI : http://en.wikipedia.org/wiki/Magnetic_resonance_imaging