MRI uses large magnets and radio-frequency waves to produce high-definition images of the heart and blood vessels. The test does not involve radiation, so is safer.
It is a useful complementary test to routine cardiac tests. In particular, it is great for looking at structure and function of heart chambers and valves, great vessels and pericardium (the "sack" surrounding the heart). Hence, it is extensively used in patients who have had prior heart attacks, heart muscle disease, valvular diseases and congenital abnormalities.
The test is relatively long compared to other cardiac tests, taking ~30-60 minutes.