Iodine in contrast agents is a very heavy element and causes the x ray beams which are sent through your body during a heart catheterization, to be deflected away from the camera. That is why the blood vessels are dark, ie they are opacified with contrast and conduct radiation worse than the surrounding tissue. That is the general principle.
Well, an angiogram pretty much is the insertation of iodine into the heart's vessicles and veins.
The iodine changes the color of the veins - allowing a specialist to examine any corrupt or damages areas.