Two keys (passwords in a sense) are generated. One is your private key, kept nice and safe and not shared. One is you public key, given to everyone you meet. If someone wants to send something secret to you, they encrypt it with the public key. The trick is that only the private key can decrypt it. This is the basis of most online secure commerce and private email. Also used for digital signing.

See also private key cryptography.