how to generate or calculate a key pair from a seed?

Using, for example, the electrum wallet, how, exactly, is the key pair, and hash address, generated from a paper or metal wallet? Assuming libsecp256k1 was employed.