IM can be done with either data or SMS text messages. The latter is not considered data and will be an extra charge in most cases. Some of the T-Mobile plans with come bundled with phone minutes, unlimited data and unlimited SMS.
If you use the T-Mobile IM Client for the BB, it uses SMS so you'll need the appropriate text package. If you go with a third party IM program, most use data so you won't uses any sms text messages.