Yes, having past family members (parents and grandparents) who have died from cancer, increases the chances that you will also get cancer.
Further risk factors are diet, lifestyle choices (smoking and sexual practices) as well as sun exposure (skin cancer) and use of illegal drugs (injected or smoked).