Variables, as mentioned previously, have two main "scopes" they can have. They can be global, where any script, any file, any event or function or command can access them. Or, they can be local, where ...
AppleScript is OS X’s naive scripting language and allows you to automate repetitive operations which involve one or more applications. Imagine the time you could save! And the boredom you can avoid!