If you have an iPhone, you can use WiFi to text other iPhones through an Apple exclusive platform called iMessage. It is integrated with the iPhones operating system. But you can’t use it on an Android phone, nor can you use an iPhone to text an Android phone over WiFi
You can text on an Android over WiFi but both the sender and the recipient have to have WhatsApp. We always make sure to establish before the cruise how we are going to communicate with the people we need to text when we are on the ship (pet sitter, our kids, etc). Most of the have iPhones, which makes it easy. We use FB Messenger for the others. Hope this helps.