Answer
Cancer has a hereditary component if it involves a gene which is inherited in a state which is prone to mutate so that the gene promotes cancer.
Work Step by Step
There are some alleles of genes which are in a sense pre-cancerous, more readily mutated to promote formation of cancer. Thus, some caners "run" in some families with these alleles.