If you close a message window, the other user may still have theirs open and can continue to talk to you, opening a new window on your screen. If you accidently close a window mid-conversation, double-click on the contact (or right-click and select "Send Message...")in the contact list to re-open a new message window. If you hide the window, go to the contact list, select "Tasks", click the conversation and it will reappear on the desktop. (NOTE: Tasks might be in a contact list "drawer" or "tab" in skins that use drawers or tabs.)
With IRC, if you close the window, you've left the channel but you are still connected to the IRC server until you disconnect.