Public key cryptography involves a pair of keys: a public key and a private key. The public key can be shared openly, while the private key is kept secret. This cryptographic method is used to ensure secure communication, authentication, and data integrity.