The number that generates the private key, is it stored somewhere? I understand that the private key is generated with a random number


  Specifically, any 256-bit number from 0x1 to 0xFFFF FFFF FFFF FFFF
  FFFF FFFF FFFF FFFE BAAE DCE6 AF48 A03B BFD2 5E8C D036 4140 is a valid
  private key


I would like to know if this number is stored somewhere. If it is stored, we will be able to regenerate the private key, and the pubic key. Is that right ?
The private key IS a number, and is remembered as such. It may be generated thought various means (like HD wallets, deterministic generation, from a BIP39 seed, or randomly). It is usually stored as 32-byte array.

The private key is then converted to a public key. This requires a complex mathematical operation, and results in a coordinate pair on an elliptic curve. This is usually stored as a 33-byte or 65-byte array.

That public key is then hashed, a checksum is appended to it, and converted to base58. The result is what is called an address, and is what you give out to others to get paid by them.

The private key never leaves your computer/wallet/app. The address is public.