If you don't sign your true first round pick, second round pick, or third round pick you will be awarded with a Type D pick the following season.
In order to receive the compensation pick you must offer the player 100% of his initial demands, he must refuse to sign, and you must never withdraw your offer to the draft pick at any time. If the player counters and you wish to make a new offer you can do so but the new offer must be 100% of his new demands and it must also not be withdrawn. Essentially your last offer must have been at least 100% of his demands at the time the offer was made and never withdrawn.
If those conditions are met then you will receive a compensation pick in next seasons draft in the same slot that you picked the previous season plus one depending on any other shifting from franchises that were awarded Type D compensation picks before you. This holds true for the first and second round. For third round compensation picks you will receive a pick in a supplemental round at the end of the third round in the following seasons draft.
Compensation round picks for Type A and Type B FAs DO NOT qualify for Type D compensation picks.