Cells of the body don't normally have the ability to divide indefinitely. They have a limited number of divisions before the cells become unable to divide (senescence), or die (crisis). The cause of these barriers is primarily due to the DNA at the end of chromosomes, known as telomeres. Telomeric DNA shortens with every cell division, until it becomes so short it activates senescence, so the cell stops dividing. Cancer cells bypass this barrier by manipulating enzymes (telomerase) to increase the length of telomeres. Thus, they can divide indefinitely, without initiating senescence.
