Cyanide is not an element, but rather a compound which consists of a carbon atom triple-bonded to a nitrogen atom. As others have stated above, it is the carbon which bonds to the iron. Think of it this way. The iron forms a set of boxes all bonded to each other. Given the right conditions, a carbon atom "slips" into the box. This has the effect of producing a "harder" metal. The key is to prevent the iron atoms from bonding with oxygen during this process. If they do, all you have done is to produce rust. That is why, using charcoal or cyanide, the pack and quench are so important.

If I recall correctly, when Dr Gaddy took SEM images of a case color harden piece, the depth was only a few atoms.

Pete