Still unknown really. Basically cancer is mutated cells that stop following the body's rules. They grow uncontrollably despite signals from their neighbors to stop. They break through natural barriers that most cells respect. Eventually they may reach lymphatic or blood vessels. A few cells then break free and colonize other tissue, like lymph nodes or other organs-metastasize. Each cancer has its own patterns.
Cell type. Different cancers behave differently. Some cancers rarely spread, and other spread or metastasize more easily. Some cancer cells can get into the blood stream and spread to to other organs, or can get into the lymph system and spread to lymph nodes. Some cancer cells encourage new blood vessels to grow and feed themselves.
Continued. Cancer research studies apoptosis (cell death) carefully, because cancer cells essentially refuse to self-destruct when told they have uncorrectable errors in their dna. The error-control mechanisms are very sophisticated. If there are generic defects in these, like p53, brca, and others, then bad cells can multiply and mutate without interference.