Magnetic resonance imaging (MRI) is a test that uses a magnetic field and pulses of radio wave energy to make pictures of organs and structures inside the body. In many cases, MRI gives different information about structures in the body than can be seen with an X-ray, ultrasound, or computed tomography (CT) scan.