Sometimes you might get charged for a text message even though most texts are included free in your plan or you have plenty of allowance left. This is often because your phone has converted your text (SMS) to a picture message (MMS). Picture messages aren't included in your plan.
Typically, phones will convert text messages into picture messages when:
On some phones you can clearly see when this happens - for example, you might see a character count changing to a file size.
Some phones let you switch this function off, or enable you to set up an alert when it happens. You'll need to check the manual or go to the support website for your phone to see to do.