Each software package has its own method of accomplishing this, but the standard command will always work. It's possible to maintain multiple private conversations simultaneously, at least to the capacity the human brain has to follow all the conversational threads. Leaving IRC is as simple as closing the window in which you have been chatting. Good netiquette requires that one announce one's departure. IRC, a live activity, has some of the same problems encountered with live radio or live television.
Technical problems can cause sessions to be terminated prematurely.
Each group will continue to converse within its own servers, but participants registered on a separated portion of the network will not be able to see the conversations of the other half. Of course, IRC participants on the same server will be able to converse no matter what happens to other IRC servers. For classroom projects, teachers would do well to plan in advance which server they will use, and agree to have all classes use the same server to eliminate these problems. Anyone with an Internet connection can access IRC servers. For educational purposes, this means that anyone in the world can drop in on a classroom chat session.