There is a theoretical limit to the number of times you can replace the firmware on your NXT before it wears out. Every time you replace the firmware, a piece of data called a lock bit is used up. This bit is rated to work 100 times (minimum) before it expires.

Does anybody know how this mechanism works? Is it a hardware limitation? I know that NXT built-in flash memory has limit to 10000 write operations. But I don't know reasons why NXT firmware cannot be replaced more than 100 times. What is the "lock bit" mentioned above?

Reloading the firmware on the NXT eats up a cycle of the firmware flash page lock bits on the first two flash pages. These lock bits are rated at 100 cycles but very reliable sources have said that ATMEL has measured lock bit cycles as high as 7500. I also know that someone from LEGO has tested reflashing his NXT repeatedly until it failed. He was able to reflash somewhere around 7000-8000 times (I forget the exact number).

So it is safe to say that you shouldn't really be worried about reflashing your NXT brick multiple times. The rating of "100 cycles" of rewriting is a very conservative figure - the real value is likely to be a magnitude higher.

Lock bits (and fuse bits) are special pieces of harware used to configure ATMEL micro-controllers.

You can find documentation about them in the datasheets of ATmega series MCU for instance (the main ARM core of the NXT is seconded by an ATmega8 which deals with basic stuff such as IOs if I'm not mistaken)