An angiogram is an imaging test that uses X-rays to view the inside of blood vessels, especially coronary arteries, to detect blockages or narrowing that could lead to heart attacks.