To establish a cancer cell line, cells are collected from a primary tumor or metastatic site. These cells are then grown under specific conditions that support their survival and proliferation. Over time, cells that adapt to the culture conditions and continue to divide become a stable cell line. Key factors include the medium used, the presence of growth factors, and the environment's temperature and pH.