Variables are placeholders for numbers. That's it. If you can handle the ON/OFF values of a switch, you can handle a variable. Anything you can do with a number, you can do with a variable. Math, counting, comparison, whatever you want.
You can use \v[####] to put the value of a variable within a text message. For example, you can do something like this:
<>Set variable [0001] to the however much money you have
<>Show message: "You have \v[0001] gold"