Cells have an internal “off switch” that stops them from dividing when they shouldn’t. Normally, a cell only divides when its surroundings tell it to - when there’s a wound to repair, or when more cells are needed. When that off switch breaks, the cell divides anyway. Then again. Then again. Pretty soon you have a clump of cells that shouldn’t exist. That’s cancer.
Cancer almost always starts with damage to specific genes that control cell growth. The damage can come from many sources: random mistakes when DNA is copied, exposure to certain chemicals, UV radiation from the sun, or even some viruses. The damaged cell then loses its growth controls and starts multiplying without limit.
Your body is actually pretty good at fighting back. Special immune cells patrol your body looking for cancerous cells and destroying them. Most of us produce small cancers every single day that are caught and killed before we ever know. Cancer becomes a serious problem only when one of these rogue cells slips past the immune system, multiplies further, and starts a tumor that can spread.