Variables are basically words that contain data, which can be used throughout your document in any text object. You can have as many variables as you want in your text, and they can be re-used as many times as you want. Changing the expression (content) of one variable will change its result in each place it is used.
Variables can be created manually by typing its name in a text object, automatically by dragging a data field on your document, or automatically by objects that you add.
The next step is to connect the variables to fields in the database. To do this,
(Windows): Double click on a variable in the Variables Panel to display the Expression Editor, or right click on the text object and select the variable in the Edit Expression submenu.
(Mac OS): Double click on a variable in the Variables floater.
Double click on the database field to which to associate the variable.
Click OK to close the window.
A persistent variable is a variable that will remain present in your document even when it is not present in any text object. Persistent variables are normally useful when used in combination with the TEXT_FILE function. In order for any variable in the contents of your external file to be replaced by an expression, create a persistent variable and change that variable's expression to reflect what you want to appear. For more information see TEXT_FILE.