Text messages are sent through the cellular data services provider network. You are then charged accordingly to your phone plan. Most phones plans now include unlimited text messages, if this is not the case with your plan be careful as charges can mount quickly.
iMessage is Apples own messaging service that is available on all iOS devices and Macbooks and provides free text messages, sending photos or videos to other Apple users. If you have an Apple ID, this service will be activated automatically on your iOS devices as soon as you are on the network (Wifi or 3G). With your iOS devices you will know you are sending an iMessage when in the “message” application the text message you sent is blue instead of green.
For more information concerning iMessages view Apples page: here
In some cases iMessages have been seen to go missing or not arriving to destination. If this is the case the first thing to check is your network connection and who to which number you are sending the message to, if you are not online you won’t be able to send iMessage, neither to phone numbers or emails. In addition if you switch from an iPhone to an other phone it is a good idea to sign out of iMessage to make sure you receive all of your text messages.