The most common reason for this is anti-virus software that incorrectly thinks that mIRC is a trojan/virus (this is called a false positive) and is automatically closing it down. You would very likely need to add an exception for mIRC in your anti-virus software and if that does not work, report it to the anti-virus company so they tell you how to resolve the issue.