Prostate cancer occurs when there are changes in the DNA of the cells that are present in the prostate glands.