This link (
https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) will give you some relevant information about seed phrases.
Mnemonic seed is a 12-word-long phrase, and each word can be converted into a number, right?
Pretty much. Mnemonic seeds are commonly 12 words (corresponding to 128 bits of entropy) or 24 words (corresponding to 256 bits of entropy), but some wallets will also generate 15, 18 or 21 word long phrases. Each word is part of the BIP39 word list (
https://github.com/bitcoin/bips/blob/master/bip-0039/english.txt). Each word represents 11 bits of entropy. 11 bits of entropy is 2^11, which gives 2048 possibilities, so each word has a corresponding number between 0 and 2047.
Then, we have 12 numbers. How exactly they generate private keys? And how the seed itself is generated in the first place?
When you first set up a new wallet, it generates a random number known as a seed which it then uses to generate all your future private keys. The process of generating private keys is quite complicated, and is laid out in BIP32 if you want to learn more (
https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki). Wallets which do this are known as
deterministic wallets. To generate your seed phrase, it splits this number in to 11 bit long sections, takes the numerical value (between 0-2047 as above) of each section, matches against the corresponding word in the word list, and then displays that list of words. To recover your seed from your seed phrase, the reverse is true.