In some cases, surgery may be needed. The type of surgery depends on the specific heart problem.