The details of how PGP works are, to be honest, rather complicated. It can also be used for signing and encrypting all sorts of other stuff but is mainly used to secure emails.
PGP does have a number of issues (discussed below), but it is still the most widely used email encryption system, and therefore the most interoperable with others no matter which platform or email service they use.