Hormonal therapy works by altering hormone levels in the body or blocking hormone receptors on cancer cells to slow down or stop cancer growth, particularly in hormone-sensitive cancers like breast and prostate cancer.