According to a statement from Buckingham Palace, "During The King's recent hospital procedure for benign prostate enlargement, a separate issue of concern was noted. Subsequent diagnostic tests have identified a form of cancer." Read the rest of the statement here.
I know some people will be wondering, "Will Charles step down because of this and let William be king?" I consider that highly unlikely. That's not the way (most of) the British royal family seems to approach their royal duties, and Charles has waited a very long time to become king.