What is apoptosis (programmed cell death) and how does it relate to cancer development and treatment?

Cells are ordered by the dendretic cell to kill themselves.
Apoptosis is what happens when either A: The dendritic cell tells a cell to kill it’s self. This is primarily so that cells don’t waste resources in your body that would be better used elsewhere. For example after a bacterial infection a dendritic cell may tell a macrophage (preliminary immune defence to bacterial infection) to kill itself so that it doesn’t use proteins repairing & sustaining it’s life. Point being you could use those proteins to create new muscle or regenerate your liver etc.
B: apoptosis happens when a cell is pre programmed to determine when to kill it’s self. It’s not told to kill it’s self it comes to the conclusion that it’s the most efficient thing to do on it’s own accord. A cell notices it’s not doing much it hasn’t found any foreign contaminants or ‘outsiders’ per se. I don’t know to much about this method though.
Apoptosis is relevant to cancer development because it is this process that causes cells to die. For example cancer may develop in a heart cell due to a random mutation in that cells Deoxy Nucleic Acid (DNA) this mutation tells the cell to kill it’s self but before the cell dies it divides and continues to do so exponentially. This one cell that went wrong ends up spreading it’s genetic code across the entirety of the heart as every divisions predecessors replace previously healthy cells. This is why sections of tissue are often removed as a cancer treatment (to stop dividing cells from spreading to far and taking over other parts of the body)
Apoptosis is relevant to cancer treatment because it may be possible to trick cancer cells into killing themselves by altering their genetic code. This can be done via a process that I don’t fully understand in which (I believe) a ribosome is removed and replaced with one which is genetically manipulated). The manipualtion will tell the cell to kill it’s self before it divides or stop it from dividing at all. This trait is ‘caught’ by other nearby cancer cells and the cancer begins to recede. However we can’t actually alter the genetic code our self currently we’d have to find a cell with this trait and replicate it somehow but in the future we may be able to individually alter single alleles and other specific factors of DNA.
For more on apoptosis check out Kurzgesagt’s video The Immune System Explained I Bacteria Infection
The video explains the immune systems response to a bacterial infection and at the end briefly talks about apoptosis (the word apoptosis isn’t used but he explains why a cell might choose to kill it’s self or be told to kill it’s self).