XMPP protocol is the standard protocol for real time chat purpose,Many apps on app store uses this protocol for chatting
With XMPP protocol you can do many things like:
Single user chat
Multi user chat
Voice chat,video chat
offline messages,save history,message logging ,presence notifications etc..
Benifit of XMPP protocol :-
1)XMPP has been designed to send all messages in real-time using a very efficient push mechanism
2)XMPP tackles security issues that are not straight forward to solve in the web world. Since all traffic is routed through the server and the identity of that server can be validated with signatures issued by Certified Authorities, end users do not need to worry about complex things like signatures to establish secure communication
3)XMPP can also be used for real time chat with Facebook users and gtalk users
check out these links for more information:-
http://en.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol
http://xmpp.org/