When talking about PGP we mostly mean the OpenPGP standard. PGP itself is a proprietary software written back in 1991. GPG is an open source replacement for the PGP software. In this workshop, whenever I mention PGP I most likely mean the OpenPGP standard.
In order to use PGP we need so called key pairs, which consist of a private key and public key. This is pretty much self explanatory, but I'll tell you anyway:
"55B4 51E0" are the last 8 digits of my pgp fingerprint. My key length is 2048 Bit.
When you have someone's public key you can use it to encrypt a message that only can be decrypted using the private key of that person - which (hopefully) means that only the intended person can decrypt the message. An attacker that gets hold of the encrypted message and the public key can not decrypt the message.
This internally builds on RSA which again builds upon the mathematical principle that it is easy and fast to multiply really big prime numbers, but it's hard (takes a lot of computing time) to find the prime factors of that result. So in the end secure encryption is a bet that it takes long enough to decrypt the message. I'd say an encryption is strong enough when decryption takes longer than our planet will exist.
An important factor is the key length. Today common lengths are 1024, 2048 and 4096 bits. While 1024 is considered to be practically breakable (still with a huge amount of money and time), 2048 is considered "good enough". 4096 is not yet supported in all software and hardware, but if you're a progressive girl or guy - go for it.
If you want a better understanding of how this works I recommend watching these 2 videos:
Diffie-Hellman Key Exchange (explained with colors) RSA Encryption Algorithm
Fun fact: If a smart mathematician comes up with a solution to the discrete logarithm problem the vast majority of all cryptography in the world (including SSL, SSH, VPN) will be easily breakable.
There's even more you can do with your PGP keypair. Using your private key you can sign a message (e.g. an email) and the recipient can (using your public key) verify that you were the one who signed it and that the message was not manipulated along the way.
You can sign and encrypt a message or just sign or just encrypt a message. But if you do both (sign & encrypt) it's recommended to do it in this exact order (encryption after signing). Most likely your client will take care of such details.
Your public key does not only contain the cryptographic information how to encrypt a message for you, but there's more in it: