I use BeejiveIM on mine, I think I paid $15 or so for it.
You can configure it to "stay online" after application exit and forward all messages by mail.
[email protected] will foward the mail as a SMS message
The Iphone does not support having "background processes" so you can't have something running while using the phone for other things