The dig utility is pretty convenient to use. The order of the arguments don't really matter.I'll show you some easy examples.
To get all root name servers use
# dig
To get a TXT record of a specific host use
# dig example.com txt
# dig host.example.com txt
To query a specific name server just add @nameserver.tld
# dig host.example.com txt @a.iana-servers.net
The SPF RFC4408 says that SPF records can be stored as SPF or TXT. However nearly all use only TXT records at the moment. So you are pretty safe if you only fetch TXT records.
I made a SPF checker for visualising the SPF records of a domain. It might help you to understand SPF records better. You can find it here: http://spf.myisp.ch