SPF (RFC 7208) is a TXT record on the domain itself. A domain may have only one, and checking it may take at most 10 DNS lookups; going over makes SPF fail.
DKIM (RFC 6376) adds a signature to each message. Receivers fetch the public key from selector._domainkey.example.com and check that the message wasn’t changed. DMARC (RFC 7489) lives at _dmarc.example.com: a message passes when SPF or DKIM passes for the domain in the visible From address, and the policy, p=none, quarantine or reject, says what to do with the rest.
Gmail and Yahoo have required SPF, DKIM and DMARC from bulk senders since 2024. Without them, order confirmations and password resets land in spam or are refused, and anyone can send mail that looks like it came from you.