I will not go into the finer details, but, as a quick summary:
COSMIC
Primary goal is to catalogue somatic mutations in cancer, so, mutations that are present in a tumour biopsy that are not present in the matched normal. In some cases, a variant that 'may' be somatic is included if it was identified in a tumour sample that came from a study where no matched normal was used (or a pool of normals was used).
GWAS Catalog
This catlogues statistically significant variants that were identified in GWAS. It catalogues these for cancer and other diseases / traits, too. So, these are likely germline variants that have been found to increase/decrease risk for the phenotype in question. It is obviously well documented that germline variants, even those with MAFs as high as 10%, can increase risk of cancer.