Key Generation is an algorithm
that generating Cryptographic Keys
Modern cryptographic systems include Symmetric Key Cryptography algorithms (such as DES and AES) and Public Key Algorithms (such as RSA).
Symmetric Key Cryptography algorithms utilizes a Cryptographic Key
Public Key Algorithms outputs the Private Key and a corresponding Public Key.
Cryptography uses integers for Cryptographic Keys. In some cases keys are randomly generated using a Pseudorandom number generator (PRNG).
In other situations, the Key Generation is derived deterministically using a password and a Key Derivation Function (KDF).
Many Cryptography protocols are designed to have Perfect Forward Secrecy, which requires Key Generation of a new Cryptographic Key for each session.
NIST Special Publication NIST.SP.800-133 covers Recommendation for Cryptographic Key Generation
There might be more information for this subject on one of the following: