YubiKey device has some internal counters which along with other configured parameters are used to generate One Time Passwords (OTPs). These counters get updated on when a YubiKey is powered-up (inserted into a USB port) and for every YubiKey button touch.
This counter information is also maintained on the server side and used for validating the YubiKey OTPs and updated for each OTP that is successfully validated.
The details of Yubico OTP algorithm are described in details at: http://static.yubico.com/var/uploads/Yu ... al-2.0.pdf
Therefore it is not recommended to configure multiple YubiKeys with identical configuration.
To address the situation if a user lost YubiKey, many applications allow assigning multiple YubiKeys to the same user account and some applications also offer interface for administrators/users to reassign new YubiKey(s) in case the original is lost.