Usually 12+ years
Four years of medical school, five years of surgical residency, additional three years of subspecialty cardiac surgery.
Then add more time for any research or sub-subspecialty work. Some special tracks may allow some consolidation of training. But it also matters where they got their training, not just how long.