Genetics play a crucial role in the development of cancer. Mutations in certain genes can lead to uncontrolled cell growth, which is the hallmark of cancer. These mutations can be inherited from a parent or acquired during a person's lifetime due to various factors, such as exposure to carcinogens, radiation, or other environmental influences.