Oh, and eavesdropping is pretty easy as well. Aside from sending passwords in the clear, this arrangement also means you have to maintain a password file, which can be unwieldy if you are serving several thousand users or more. In a word, cryptography. In symmetric cryptography, data is encrypted and decrypted with the same key. If Alice wanted to send a message to Bob, she would need to give him the key to decrypt her messages.
Asymmetric encryption works a little differently.
Both Alice and Bob have two keys, a public key and a private key. The keys are mathematically related, and Alice's private key can decrypt messages encrypted using her public key. Conversely, messages encrypted with her private key can be decrypted with her public key. Same goes for Bob. So now, if Bob wants to send a love letter to Alice, he can encrypt it using Alice's public key, and the only person who can decrypt it is the person holding the private key that corresponds to Alice's private key.