This question already has an answer here:
I looked this up a few times already, but I still don't really understand how public/private key encryption works. The wikipedia page on public-key cryptography says this:
Public key cryptography, or asymmetrical cryptography, is any cryptographic system that uses pairs of keys: public keys which may be disseminated widely, and private keys which are known only to the owner. This accomplishes two functions: authentication, which is when the public key is used to verify that a holder of the paired private key sent the message, and encryption, whereby only the holder of the paired private key can decrypt the message encrypted with the public key.
The part I don't understand is why only the holder of the private key can decrypt the message encrypted with the public key. When you encrypt a message with a key, it should be possible to decrypt it with the same key right?