In blockchain and crypto, a nonce refers to a number or value that can be used for authentication purposes a single time. It is generated pseudo-randomly for use as a counter during mining within a blockchain network.
To understand this better, let's take the example of Bitcoin. Miners within the Bitcoin network need to guess the correct nonce for the cryptographic process involved in mining a new block. In the process, a valid block gets granted to the miner who guesses the correct nonce, and they receive rewards in BTC for providing computational resources in identifying this nonce.
A nonce is arrived at through trial and error, and in a proof-of-work blockchain, it could require significant energy and computing power. However, the complexity of finding the correct nonce makes the blockchain network cryptographically secure and nearly impossible to hack.