A TXT (text) record is used to hold some text information. You can put virtually any free text you want within a TXT record.
A TXT record has a hostname so that you can assign the free text to a particular hostname/zone. The most common use for TXT records is to store SPF (sender policy framework) records and to prevent emails being faked to appear to have been sent from you.
A TXT record is commonly used to store what is called SPF (Sender Policy Framework) data.
SPF data controls which IP addresses and servers are allowed to send e-mail from your domain so it is used to combat spam.
For example you could set up a TXT record on mywebsite.com that contains the internet IP address of your computer at home, this would mean that mail claiming to be FROM: email@example.com is only allowed to come from your home IP.
Anyone else trying to send mail as FROM: firstname.lastname@example.org would be rejected, because the IP address of the computer they are sending from is not contained in the TXT record.
TXT records can also have other uses such as verification for Google Apps or Micorsoft Office 365.