dtldarek has given an answer from one point of view. Let me offer another.
A variable in mathematics often means an element in something (a ring, a group, a vector space, ...) which can be specialized to some more specific value.
In modern algebra, this notion becomes formalized in various ways, one of which is by the notion of the free object on (wikipedia say "over", but my own experience is that it is more common to speak of the free object "on") a particular set of variables.
If you haven't seen it before, this notion will probably seem quite abstract (like a lot of formalism the first time you see it!). But it actually provides a rather precise formal match with the intuitive notion of a variable.
Added in response to the OP's comment: E.g. the polynomial ring $\mathbb C[x_1,\ldots,x_n]$ is the free commutative $\mathbb C$-algebra in the variables $x_1,\ldots,x_n$. If $A$ is any other commutative $\mathbb C$-algebra (e.g. $\mathbb C$ itself), then giving a homomorphism $\mathbb C[x_1,\ldots,x_n] \to A$ is the same as choosing $n$ elements $a_1,\ldots,a_n \in A$ ("the values of the variables") and declaring $x_1\mapsto a_1,\ldots, x_n \mapsto a_n$.
This illustrates the general principal that the free object (in some particular context) on the variables $x_1,\ldots,x_n$ is an object in which no relations are imposed between the elements $x_1,\ldots,x_n$, and so it can be mapped to any other object (of the appropriate sort) just by choosing values of the variables $x_1,\ldots,x_n$ in that object.
Variations of this point of view are how idea about variables and equations between them are implemented in contemporary algebraic geometry, for example.