The illegitimate son of a king has no claim on the throne--there was an attempt in the 17th century to put the Duke of Monmouth on the throne instead of the Duke of York (who became James II) because he was an illegitimate son of Charles II, but that went nowhere.
Prince William, the new heir apparent, is descended from one of Charles II's illegitimate children. Charles II's wife, Catherine of Braganza, was descended from an illegitimate child of Pope Alexander VI.