A NAND gate is a logic gate that produces an output of 0 only when all its inputs are 1. In all other cases, the output is 1. So, if any of the inputs is 0, the output will be 1. If all the inputs are 1, the output will be 0.
To put it another way, the NAND gate behaves like an "inverted AND" gate. It produces an output of 1 when any of the inputs is 0, and only produces an output of 0 when all the inputs are 1. This behavior makes the NAND gate a very useful building block in digital circuits, as it can be used to implement any other logical function.