In public key cryptosystems, two keys are generated by the user, a public key and a secret key. The public key is used to encrypt messages to that user and is made available for others to find online. When messages are encrypted using that public key, only the secret key—controlled by the user—can decrypt them. Public key crypto is widely used both for encrypting data traffic between two users/networks/devices and for encrypting files. Due to the strength of the public key system algorithms, such crypto is essentially unbreakable without a quantum computer.
Quantum key distribution systems use quantum mechanics to enable secure communications between two parties by generating a quantum key. The major advantage of transmitting information in quantum states is that the system itself instantly detects eavesdropping attempts as quantum systems are disturbed by any sort of external interference. In practical terms, this means that quantum encrypted data transfers are unbreakable and attempts to intercept automatically fail. Note that quantum crypto doesn’t work for basic file encryption, its only use is in protecting communication channels.
While quantum key systems have an advantage over public key systems, they are both more expensive and less practical. In order to generate a quantum key, the two communications devices must be entangled together on a quantum level, in the same location, and then separated. So quantum key encrypted communications channels require some setup effort, especially if long distances are involved. Since the implementation of quantum cryptographic protocols is an extraordinary expense, it is usually only adopted for major high-security communications links.