Picture a sealed envelope with x written on it. Someone slips in a $5 bill, and now the envelope holds $12 in all. You can't see inside, but it must have started with $7. Writing x+5=12 is the same picture in symbols: x is the envelope. The letter is not the answer. It is a name for the place where the answer goes.
A variable can also stand for a number that changes. If a taxi charges $3 per mile, the fare for m miles is 3m dollars. Here m has no single correct value: put in 2 and the fare is $6, put in 10 and it is $30. One short rule describes every trip.
Not every letter in math is a variable. In the circle formula A=πr2, the letters A and r are variables, but π is a constant: it is always about 3.14159. Units are another look-alike: in "5 m" the m means metres, not a number. To tell them apart, ask whether different numbers could sit in that spot. If the letter is fixed or names a unit, it is not a variable.
Each problem sets its own variables. The x that equals 7 in one problem can equal −2 in the next, and two different letters, such as x and y, are allowed to have the same value.
Think of it like this. A variable is a labelled jar on a shelf. You can say "the red jar holds 3 more marbles than the blue jar" without knowing either amount, and the sentence stays true whatever is inside. Unlike a jar, though, a variable in an equation is often forced to hold one particular number.
Core idea. A variable is a symbol that holds a number you don't know yet or one that can change.