How does DKIM work?

DKIM works by adding a digital signature to the headers of an email. The signature is created using a private key, which is held by the sender, and verified using a public key, which is published in the Domain Name System (DNS). When an email is received, the recipient's server can use the public key to verify the authenticity of the sender's domain and the integrity of the email.