If it doesn't have a cellular connection (assuming it's WiFi only), you'd need to have some way to get a phone number on it in order to text since text messages are generally addressed using phone numbers. You would need a solution such as Google Voice (if you're in the US) to get a virtual number for texting.
If you have a cell phone with texting, some carriers have tools that will let you set this up. Some phones also do, regardless of carrier.
The final option is to forego texting as SMS/MMS and use a 3rd-party app to message. This would require that all you message with also use said app.