SMS messages are sent using the "unused" data space in the housekeeping packets of the cel network. Thus you need the cel radio turned on to use the cel network.
Instant messaging, email, and other types of messaging are done using the internet (your data plan), which can be either via the cel network or wifi.