Children or adults with persistent congenital heart problems often have heart surgery. Surgery can help correct the abnormalities and prevent or improve heart failure.