The code is supplied with the game, printed on the manual or on a sticker inside the case. It is unique to your copy, so a string of identical digits such as 1111111111111111 is a placeholder rather than a working key, and the installer will reject it.
If your copy is second-hand and the code is missing, Ubisoft support can help if you have proof of purchase. Otherwise the game cannot be installed legitimately.