What is DKIM ?
DKIM means Domain Keys Identified Mail. It is a cryptographic protocol based on the public key, private key system. The private key is yours and should not be known by anyone else while the puclic key can be spread.
The aim is to avoid spammers or others to usurp legitimate identities.
How does it work ?
Within every sent email, a signature is add in the header. This signature is generated from a key, specific to your domain, the private key. The public key is generated from the private key. It will be add to your domain in a DNS record, accessible to the public.
When a webmail provider like Gmail or Outloook receive a message, it extract the signature. Inside, it gets the public key from your DNS record and checks if the signature was generated from the private key. If it matches, your email is legitimate. Otherwise, your email will be perceived as a spam or phishing attempt.
Verify your emails are secured
You can validate your configuration looking at the source cod of an email.
The words "spf = pass" and "dkim = pass" certify the message was signed with the domain. With theses security protocols, you can prove your messages legitimity but also your reputation in ISP's and webmail's eyes.