As others have said, it largely depends on how you manage your DNS. If it's BIND, here's the line that provides the TXT record for teaparty.net:
IN TXT "v=spf1 a:spf.teaparty.net a:home.ddns.teaparty.net mx -all"
If you're a BIND user, I thought it might help to have a concrete example to work with; note that this line comes immediately after the SOA record, as it depends on position inside the file to pick up that it's a record for the domain itself, not some host or subdomain therein.
If you're not a BIND user, let us know what you are running.