SPF flattening involves converting complex SPF records with multiple DNS lookups into a simpler format. It replaces multiple "include" mechanisms with a single list of IP addresses. This reduction in DNS lookups helps keep SPF records within the permissible limit.