How SPF works
SPF is a TXT record that lists the servers allowed to send mail for your domain. A receiver looks up the record for the domain in the message's envelope sender, works through it from left to right, and stops at the first term that matches the sending IP.
A typical record: v=spf1 include:_spf.google.com include:spf.privateemail.com ~all. Each include pulls in another provider's list. The final all decides what happens to every other server: ~all marks it suspicious, -all rejects it.