I am very sorry to hear that your father had cancer. This is a very good question. Cancer is term that is used to describe cells which have undergone change such that they develop uncontrolled growth and no longer respect the normal tissue borders such that they grow into and invade surrounding tissues. Malignancies (cancer) can metastasize (spread to distant sites within the body) by invading blood vessels, or by invading the lymphatic system. While there has been a significant amount of research into cancer and its causes, it is not fully understood. What is understood is that for some reason some people have a genetic predisposition to developing different types of cancers.
So genetics plays a significant role in certain types of cancer development. We also know that there can be environmental factors that can cause insults to the DNA (that codes for cellular enzymes, proteins, etc) during the cell cycle which can result in changes that can lead to the development of cancer. Certain environmental factors are well known/studied such as smoking, and are a significant factor in the development of multiple different types of cancer. Thus diet aside, staying away from smoking will be a large benefit as far as cancer prevention.
It is hard to give you specific advice for prevention, as there are so many different types of cancer, and there are different risk factors for each. In general, eating a well balanced diet, and exercising regularly will only improve your health. Making sure that you have a diet that has plenty of foods containing antioxidants will also benefit you. Eating vegetables with vitamin C, vitamin E, and beta carotene will both decrease free radicals (known to be carcinogenic) and also help to improve cardiovascular health. I hope that this helps.