Nonces are used to generate a valid hash, which in turn ensures that a confirmed block cannot be tampered with in any way.