Many contributors have already made good suggestions how to reduce the risk of getting cancer, or how to deal with it; but I found most posts quite _technical_.
Speaking in general terms, cancer is not a disease like a common cold. The human body sooner or later is bound to decay, which pretty much starts once one is fully grown, and mutations get less often corrected by the wonderful repair processes our bodies are equipped with. Occasionally, mutations lead to uncontrolled growth of malign tissue, some incidents of which are bound to lead to death, others not.
And while it is absolutely a good idea to life healthily and to take care of one's physical and emotional well-being, one should also never deny that we are all mortals, and cancer as well as traditional diseases can and eventually will wipe any individual out. I am at peace with that, for we need to make space for the next generation (only adding people to planet earth would not be sustainable, as resources are scarce - imagine nobody would ever die). Being on this planet for a limited time period makes it more important to make the right choices, because we have only one life.
Because it is a statistical process, we can forecast how many are affected, but not which individual, and everyone can try to minimize one's chances to be affected, but this does not mean they will live forever. And it's not just cancer, there are many ways one may pick the unlucky straw: it is not widely known, but the number of people who die from a heath attack in their 20s is significant. Make the best of every minute you have, and live it as if it were your last.