Digital signatures use public key infrastructure (PKI) to create a unique digital fingerprint for each document. This involves a pair of keys: a private key, which is kept secret by the signer, and a public key, which is available to anyone who needs to verify the signature. When a document is signed digitally, the private key encrypts the document's hash value, creating the signature. The recipient uses the sender's public key to decrypt the hash and verify the document's integrity.