A Variable allows you to reference something (like a word, or number, or entire sentence) without having to actually "hardcode" that word into your script each time you change it. This allows you to quickly change the value of your Variable without having to re-write your entire script. You can also store information (such as user input) for short or long periods of time.
Here's an example:
Alias MyFavoriteColor {
set %FavColor $1-
echo -a * Your favorite color is %FavColor
}
Alias WhatIsMyFavoriteColor {
echo -a * As I understand it, you like %FavColor
msg #mIRC Guess what, I like the color %FavColor
}
If you were to type
/MyFavoriteColor blue, then the long-term variable
%FavColor would equal
blue. Anywhere you use
%FavColor, the word
blue would appear. That is, until you decide your new favorite color is
green.

- Raccoon