Key generation is the process of creating a new private key, or a seed from which keys are derived, together with its matching public key. In public-key cryptography the private key must be a number that nobody else could guess, so generation depends on a strong source of randomness.
Weak randomness is the classic failure. If a wallet or device draws keys from a predictable source, an attacker can recreate the same keys and empty the addresses, and such flaws have led to real losses. Institutions therefore generate keys inside certified hardware security modules or secure enclaves, often during a witnessed key ceremony. A newer approach, distributed key generation, is used in multi-party computation: several parties each create a share, and the full private key is never assembled in one place. Consumer wallets usually show the result as a seed phrase for backup.
Ref 1070001056