To set up an SPF record, you need to add a TXT record to your DNS settings. Here is a basic example:
v=spf1 include:example.com ~all
In this example, 'v=spf1' denotes the version of SPF, 'include:example.com' specifies trusted servers, and '~all' means that emails from non-specified servers should be marked as soft fail.