Normally, SMS texting requires the use of a cellular carrier -- even on an iPhone, you can't send SMS texts using the Messages app over Wi-Fi. But even though the iPod Touch can't use a cell connection, it offers two alternate methods for sending and receiving text messages: using iMessages or using third-party apps.
Since iOS 5, the built-in Messages app has supported iMessages in addition to SMS messages. Unlike SMS texts, you can send and receive iMessages over Wi-Fi; these iMessages cost nothing to send. Also unlike SMS texts, however, iMessages only work with Apple products. You can use them to chat with people on iPhones, iPod Touches, iPads and Mac computers, but they won't work with any other brand of phone. To set up iMessage, open the "Settings" app, tap "Messages" and then "Use your Apple ID for iMessage." Sign in, tap "Send & Receive" and add all email addresses and phone numbers you want to associate with your account.
To text people who use non-Apple phones from an iPod Touch, you have to download an alternate texting app from the App Store. Numerous companies offer apps for sending SMS texts over Wi-Fi, each with its own features. For example, Facebook Messenger and Google Voice make it easier to message your contacts on their respective services. Other options include Text Free, which allows you to view your texts on your computer.
Information in this article applies to iOS 7. It may vary slightly or significantly in other versions.