Heart failure (HF) is a complex trait, influenced by environmental and genetic factors, that affects over 30 million individuals worldwide. Historically, the genetics of HF have been studied in Mendelian forms of disease, linking rare genetic variants to familial cardiomyopathies. More recently, genome-wide association studies (GWAS) have successfully identified common genetic variants associated with risk of HF. However, the relative importance of genetic variants across the allele-frequency spectrum remains incompletely characterized. Here, we report the results of common- and rare-variant association studies of all-cause heart failure, applying recently developed methods to quantify the heritability of HF attributable to different classes of genetic variation. We combine GWAS data across multi-ancestry populations including 207,346 individuals from HF and 2,151,210 without, identifying 176 risk loci at genome-wide significance (p < 5x10-8). Signals at newly identified common-variant loci include coding variants in Mendelian cardiomyopathy genes (MYBPC3, BAG3), as well as regulators of lipoprotein (LPL) and glucose metabolism (GIPR, GLP1R), and are enriched in cardiac, muscle, nerve, and vascular tissues, as well as myocyte and adipocyte cell types. Gene burden studies in the Penn Medicine BioBank uncover exome-wide significant (p < 3.03x10-6) associations for HF and rare predicted loss-of-function variants in TTN and MYBPC3. Although the total burden heritability of rare coding variants in HF (3.5%, 95% CI 0.94-6.0%) is comparable to common variant heritability (4.3%, 95% CI 3.9-4.7%), burden heritability is highly concentrated in a small set of Mendelian cardiomyopathy genes (30.4% explained by TTN, LMNA, FLNC, and MYBPC3), while common-variant heritability is more diffusely spread throughout the genome. Finally, we demonstrate that common-variant background, in the form of a polygenic risk score (PRS), significantly modifies the risk of HF among carriers of pathogenic truncating variants in the Mendelian cardiomyopathy gene TTN. These findings suggest a significant polygenic component to HF exists that is not captured by current clinical genetic testing.