A %variable is a kind of "shortcut" to a value. It holds texts, numbers or whatever you need that, as the name suggest, can vary from time to time. Variables can be easier to use because, instead of writing the whole value, you just put the var's name there

The variable %quit.chans, in this case, would hold the channels you want to hide the Quits from. Having the %quit.chans variable there or simply puting #bar,#mirc,#channel is the same thing, as long as you separate the channel name with a comma (,).
To create a variable you use the command
/set. Here's what the help file says about it:
/set [-snzuN] <%var> [value]
This sets the value of %var to the specified value.
If you specify the -uN switch, %var is unset after N seconds, assuming it is not set again by another script. If you specify a zero for N, the variable is unset when the script finishes.
The -z switch decreases %var until it reaches zero and then unsets it.
The -n switch makes it treat value as plain text.So, the set the variable %quit.chans you can use:
/set %quit.chans #channel1,#channel2,#channel3 and so on.. You can modify the var by either doing a new /set command or going to the Variables editor (Alt + R and clicking on the tab Variables).
There are also temporary variables which exist only while the script which set them is running. Those are made with the command
/var (Syntax is: /var %var_name = <value>)
In the script above you can either put
#home,#office,#bar or create the %quit.chans variable with that value. It will work either way
as long as they are separated by a comma.
For further help you can type, in your mIRC,
/help variables.
I hope this could help

Zyzzyx.