When WiFi is not accessible, iMessage instead uses cellular data to transmit messages. Using iMessage will result in pay-per-use data charges if you don't have a data plan and aren't connected to WiFi. SMS is still used in some situations.