One criticism about the iPhone is the lack of a dedicated iChat/AIM client. Some have tried to use Web 2.0 Instant Messaging applications such as Meebo with mixed results.
Forum user dontwalkhand provides an interesting tip that allows you to actually log into AIM over SMS and send and receive messages as if you are logged in. This means that you appear on your friend's buddy lists as logged in, and messages sent to you automatically arrive via SMS.
To Login to AIM over SMS. Send a text message
"ScreenName[SPACE]Password" to 265000
Example: "JohnDoe abcdefgh" (where JohnDoe is your username, abcdefgh is your password)
You will then recieve a confirmation message back with a list of your buddies. To send an IM to one of your buddies:
"ScreenName[Colon][Space] Message" to 265010.
Example: JohnDoe: Hey dude wahts up?
When someone sends you an IM, it will land in your SMS inbox, simply reply to the SMS as if you were sending any regular old text message.
Obviously, chatting over SMS can get expensive so unless you have an unlimited SMS plan, you should be wary. In my brief testing, it appeared to work well, but can be a little awkward initially once you get individual chat sessions started with your buddies.
A full guide to AIM Text Messaging services is available here (PDF).
Users of Yahoo Messenger or MSN can similarly use Yahoo's Messenger for SMS documented here.