They are mostly clonal populations harvested from cancer biopsies that were chosen because they can proliferate (almost) indefinitely.
Just read up on the fascinating story of HeLa cells in the book "The Immortal Life of Henrietta Lacks" That's where they got the cells that are named HeLa cells.