You can do it manually or you can set up automatic chat closing.
Manually: click on the cross in the upper right corner.
You can set up chat autoclosing in Settings > General > Chat autoclosing. Set the time after the last message in the chat for the chat to be considered complete. When this period expires, the chat room closes automatically.
If the client writes a new message in a closed chat, the dialog box goes to Chats > New chats, and it can be taken by another operator.