Does iPhone use data/Wi-Fi for texting?

I've been an android user for years now and just got a 5 so I'm totally new to this. Overnight turned off my data and Wi-Fi to conserve battery (as I always have with my android device), in the morning when I turned on my Wi-Fi I received a bunch of texts that were sent hours ago. Does this mean without Wi-Fi or data I can't text nor receive texts?

Data usage is not an issue for me since it is unlimited for me but I feel that it would become a hassle to constantly leave your data on to receive texts. Or maybe that's just me since I've been in the android world for so long.

For the iPhone it only uses the internet, data or Wi-Fi, to receive or send imessages not text messages. If it is an I message it will be blue if text message it will be green.

Text messages use cellular data.

Were the texts blue or green. Green is a standard text message while blue is imessage through wi-fi.