Are you talking about a voice chat? This may be a hard task and the hosting well be even harder (a lot of traffic).
For a text chat see this example here
http://sourceforge.net/projects/ajaxperlchat/[
^] using perl and ajax. But be aware, most hosting companies limit the execution time and memory (voice chat) of scripts so your solution may not work on managed webspace.
Hans.