If public chat is activated by the site admin, opening this window automatically join to the public chat. Public chat works as private chat but with less options. Look at private chat for more informations.
This function is now a plugin. Insert this plugin only if you need it, a lot of site have a poor activity on their public chat.