...
I open a new electrum wallet, and I choose to import that private key (I type it manually). I then encrypt my wallet.
Electrum then 'magically' finds my bitcoin address, how does it do that?
Because the bitcoin address is derived from the private key...
So if you have the private key, you get to the address just by following the necessary steps: Private Key -> Public Key -> SHA256 -> RIPEMD160 -> add some bytes -> Couple of SHA256s -> add some more bytes -> Base58check encode -> Bitcoin Address
You can see the step by step process in action here:
http://gobittest.appspot.com/AddressNOTE: don't enter any of your actual private keys in this website