There are already good answers, but I really struggled with this when first encountering logic and proofs, so I hope my own perspective is useful to someone.
Often we want to to prove something about all elements of a set S. That is, we want to prove that every element in $S$ satisfies some property, call it $P$. For example, say $S = \{1,2,...\}$. Now say $P(x)$ stands for the statement "$x$ is greater than $0$". Clearly $P(1)$ is true, and so is $P(2)$ is true, and indeed it should be obvious that no matter what number we choose from $S$, $P(\text{ 'that number' )}$ will be true.
We want a way to express the truth of the statement in the above example. We know that no matter what object I choose from $S$, the statement $P$ will be true for that object. We do this by reasoning about an arbitrary object from that set. We say $x \in S$, and specify nothing more. Now the key bit here is that $x$ is not simultaneously "all objects in $S$". $x$ represents a specific number from the set $S$, we just don't say which one.
Going back to our example, say I tell you $x \in S$. Now $x$ represents some specific number in $S$, but we don't know which. Suppose $x$ actually represented the number $20$. Well of course $P(20)$ is true, because $20>0$. Similarly, if $x$ actually represented the number $1727361$, then $P(1727361)$ would be true too. The pattern here is clear: no matter what number $x$ actually represents, $P(x)$ is true. It is in this sense that $x$ can represent any/all elements of $S$.
Ultimately, our example can be written as $\forall x \big(x \in S \rightarrow P(x)\big)$. This statement is really saying, "for every object $x$, if this object is a specific a number in the set $S$, then the statement $P(x)$ is true." Note the key point here is that I have said $x$ is specific, yet I have not told you what it is. The meaning here is that in the statement, we treat $x$ as a specific number. After all, we say that $x \in S$ and $P(x)$, which only make sense if $x$ is just one number. But $x$ could represent any specific number in $S$, because every number I use makes $P(x)$ true.
The above is an intuitive and informal approach; but fundamentally this question can be answered formally. This question revolves around notions of variables, quantifiers, and logic. Answers to my own questions and others' here on stack exchange do a very good job of explaining this more formal approach. For example, see this. The answer and Noah Schweber's comment are incredibly useful.
Response to comments by OP
When we say $x>-2$, yes, it is correct to say that $x$ can be any real number. $x$ could also be a function, a group, or any kind of mathematical object. $x$ is simply a symbol. There is no reason to say that $x$ must be a real number larger than $-2$. If I were to then tell you $x$ was the number $-3$, that's perfectly fine, it just means the statement is false for that 'value' of $x$.
Now, if you were to say that $x$ is an arbitrary real number such that $x>-2$, then yes, now $x$ represents a specific (yet unspecified) real number larger than $-2$. In essence we are saying $x$ is an arbitrary element of the set $\{y \in \mathbb{R}: y > -2\}$. Now it makes sense to say that $x$ is an arbitrary element greater than $-2$, because I have told you that is the case.
To summarise, the statement $\forall x \in \{y \in \mathbb{R}: y > -2 \} \big(x > -2 \big)$ is true, but the statement $\forall x \in \mathbb{R} \big(x > -2 \big)$ is not. And furthermore, $x > -2$ by itself is not comparable to the other two. This is a well formed formula, and whether it is true or not depends on what $x$ is. Of course, we may restrict $x$ to only take on those values which make $x>-2$ true. In this case, then $x$ represents some specific yet unspecified value from $\{y \in \mathbb{R}: y > -2 \}$.