Make sure the following is unchecked:
mIRC Options - IRC - keep channels open

Then to close a channel, part the channel (/part <channel>)