This is documented in Who can view chat history in HipChat Server - depending on the scope of your question, there are two main aspects:
Chat history, messages, and files details the operator point of view - chat messages in general are stored in HipChat Server's virtual machine in the /chat_history
directory.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.