If you need to go offline during an instant chat before the other person has had a chance to reply, that's ok. They will still be able to view your message and send a reply. The reply will go into your TM inbox and you'll be notified via email that you have a new message.
The 'online' icon will disappear from your chat, so the other person will be aware that you're no longer online and able to reply instantly.
You can then reply when you are next online via your Messages.