This may be because fruit and vegetables contain substances called antioxidants. Antioxidants protect cells from damage. Cell damage may start the process of a normal cell becoming a cancer cell. Also most fruits and vegetables are good sources of fibre which may reduce the risk of colon cancer. There are also others, for example, some of the substances that give fruit and vegetables their colour and flavour.
Some vegetables contain vitamin E which is also an antioxidant.
Good sources of vitamin E are nuts, seeds, some cereals and vegetable oils. Fat provides a large amount of energy so a high fat diet may make weight gain more likely. If such people also smoke, this makes the risk of cancer even greater. Carcinogens are substances which can start the process of cancer. Tobacco smoke contains carcinogens which cause lung cancer.